NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

package com.bankinter.plugins.cics;

import java.util.Date;

import javax.xml.namespace.QName;

import com.bankinter.plugins.cics.cdth.CDTHelper;
import com.bankinter.plugins.cics.cdth.CDTHelperUtils;
import com.appiancorp.services.ServiceContext;
import com.appiancorp.suiteapi.expression.annotations.Category;
import com.appiancorp.suiteapi.expression.annotations.Function;
import com.appiancorp.suiteapi.expression.annotations.Parameter;
import com.appiancorp.suiteapi.type.AppianType;
import com.appiancorp.suiteapi.type.Datatype;
import com.appiancorp.suiteapi.type.NamedTypedValue;
import com.appiancorp.suiteapi.type.TypeService;
import com.appiancorp.suiteapi.type.TypedValue;
import com.appiancorp.suiteapi.type.exceptions.InvalidTypeException;
import org.apache.log4j.Logger;

@Category("BKFunctions")
public class CallCdtBKFunction {
private static final Logger LOG = Logger.getLogger(CallCdtBKFunction.class);

@Function
public TypedValue CallCdtBK(ServiceContext sc, TypeService ts,
@Parameter TypedValue userId, @Parameter String nombre) throws InvalidTypeException {
Date ini = new Date();
Datatype tipo = ts.getType(userId.getInstanceType());
LOG.info(" TIPO : " + tipo.getNamespace()+ ":" + tipo.getName());
NamedTypedValue[] listPro = tipo.getInstanceProperties();
for (NamedTypedValue pro : listPro) {
LOG.info(" -> " + pro.getName() + " = " + pro.getInstanceType());
}
Datatype nuevo = createDataType();
LOG.info(" tipo nuevo : " + nuevo);

LOG.info("CallCdtBK TypedValue request = " + userId.toString());
CDTHelper request = CDTHelperUtils.fromTypedValue(ts, userId);
request.setValues(userId);
CDTHelper response = CDTHelperUtils.fromQualifiedName(ts, "urn:com:appian:types", "GLB_ARQ_User");

response.setValue("Name", request.getValue("Name")+"out");
response.setValue("Cod", request.getValue("Cod")+"out");

LOG.info("Tiempo(ms) CallCdtBK Fin = " + ((new Date()).getTime() - ini.getTime()));
LOG.info("CallCdtBK CDTHelper = " + response.toString());
TypedValue res = response.toTypedValue();
LOG.info("CallCdtBK TypedValue (1) = " + res.toString());
//
// Object[] objects = new Object[2];
// objects[0] = "Nameout";
// objects[1] = "Codout";
// TypedValue respuesta = new TypedValue(userId.getInstanceType(), objects);
//
// LOG.info("CallCdtBK TypedValue (2) = " + respuesta.toString());
//
// GlbArqUser res1 = new GlbArqUser();
// res1.setCod((String)request.getValue("Cod"));
// res1.setName(nombre);
// LOG.info("CallCdtBK GlbArqUser TXT = " + res1.toStringTxt());
// LOG.info("CallCdtBK GlbArqUser = " + res1.toString());

return res;
}

private Datatype createDataType() {
Datatype tipo = new Datatype();

NamedTypedValue[] instanceProperties = new NamedTypedValue[3];
for (int i=0; i<3; i++) {
instanceProperties[i] = new NamedTypedValue();
instanceProperties[i].setName("campo" + i);
instanceProperties[i].setInstanceType((long) AppianType.STRING);
}
tipo.setInstanceProperties(instanceProperties);

QName qualifiedName = new QName("urn:com:svs:types", "SVS_tipoInicial");
tipo.setQualifiedName(qualifiedName);

return tipo;
}
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.