External task - prepare method - decode-encode
In the prepare method, I write code refer to thread:
How to invoke a java application in the middle of the process
Using Papi to operate with process
How to invoke a java application in the middle of the process
If the error is caused by decoding and encodeing the URL, please tell me how to fix this problem.
Thanks a lot.
The code snippet as follows
-------------------code-----------------------------------------------
package getinstance;
import fuego.lang.DynamicObject;
import fuego.papi.Arguments;
import fuego.papi.CommunicationException;
import fuego.papi.InstanceInfo;
import fuego.papi.ProcessService;
import fuego.papi.ProcessServiceSession;
import fuego.papi.OperationException;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
public class prepare {
public prepare() {
public static void main(String[] args) {
prepare prepare = new prepare();
Properties configuration = new Properties();
configuration.setProperty(ProcessService.DIRECTORY_ID, "default");
configuration.setProperty(ProcessService.DIRECTORY_PROPERTIES_FILE, "D:\\BPM_HOME_standalone\\webapps\\papiws\\WEB-INF\\directory.xml");
configuration.setProperty(ProcessService.WORKING_FOLDER, "/tmp");
System.out.println("1111111111111");
Arguments argumentsResult = Arguments.create();
String taskIn = "0";
//String activity = "/InvokeJavaProcess#Default-1.0/InteractiveJava"; //both are fine
String activity = "InteractiveJava"; //both are fine
String instanceId = "/InvokeJavaProcess#Default-1.0/203/0";
try {
ProcessService processService = ProcessService.create(configuration);
ProcessServiceSession session = processService.createSession("jcooper", "welcome1", "host");
System.out.println("33333 instanceID="+instanceId);
argumentsResult = session.activityPrepare(activity, instanceId, Arguments.create()); // error starts from here
System.out.println("444444444");
DynamicObject obj = argumentsResult.getDynamicObject();
Map fieldMaps = obj.asFieldsMap();
for (Iterator<String> iterator = fieldMaps.keySet().iterator(); iterator.hasNext();) {
String key = iterator.next();
System.out.println("key : "+ key + "value" +obj.getField(key));
DynamicObject obj2 = argumentsResult.getDynamicObject();
Map fieldMaps2 = obj2.asFieldsMap();
for (Iterator<String> it = fieldMaps2.keySet().iterator(); it.hasNext();) {
System.out.println("key : "+ key + " value : "+ obj2.getField(key));
session.close();
} catch (OperationException e) {
e.printStackTrace();
But I get errors like follow:
-------------------error---------------------------------------
E:\Jdeveloper10131_20090318\jdk\bin\javaw.exe -client -classpath E:\Jdeveloper10131_20090318\jdev\mywork\Java_be_invoked\getInstance\classes;D:\BPM_HOME_standalone\client\papi\lib\fuegopapi-client.jar getinstance.prepare
1111111111111
Creating connector [fuego:SQL]
Creating ProcessService with id 'oracle/2009-03-31 18:08:47+08:00'.
Local folder /tmp\system\Schema3387192-1796619082\catalogs found.
Loading catalogs from local folder: /tmp\system\Schema3387192-1796619082\catalogs
1 jars found locally.
Local jar '126' succesfully loaded.
[CatalogMgrCache] =======================
Registering CatalogMgr [oracle/2009-03-31 18:08:47+08:00] ...CatalogManagerCache 14949315:
Managers:
Counters:
[CatalogMgrCache] =======================
CatalogMgr [oracle/2009-03-31 18:08:47+08:00] REGISTERED!CatalogManagerCache 14949315:
Managers:
{oracle/2009-03-31 18:08:47+08:00=fuego.util.LocalCatalogManager@1dacccc}
Counters:
ProcessService 'oracle/2009-03-31 18:08:47+08:00' created successfully.
33333 instanceID=/InvokeJavaProcess#Default-1.0/203/0
Unreachable Engine Tolerance (seconds):
by default: 0
to be used: 0
This papi client will not cache exceptions which imply that an engine could not be reached.
Adding local catalog for project: 124
[CatalogLoaderMgrCache] =======================
CatalogClassLoader[oracle/2009-03-31 18:08:47+08:00-124] added to cache
Catalog ClassLoader MAP:
{oracle/2009-03-31 18:08:47+08:00-124=CatalogClassLoader(FuegoObjectCatalog(catalogIn: 124, directoryId: oracle/2009-03-31 18:08:47+08:00))}
Catalog Manager Cache:
CatalogManagerCache 14949315:
Managers:
{oracle/2009-03-31 18:08:47+08:00=fuego.util.LocalCatalogManager@1dacccc}
Counters:
{oracle/2009-03-31 18:08:47+08:00=1}
fuego.papi.exception.TaskFailedException: Task '0' in activity '/InvokeJavaProcess#Default-1.0/Interactive[InteractiveJava]' for instance '/InvokeJavaProcess#Default-1.0/203/0' could not be successfully executed. The task failed while executing method '%PREPARE%'.
at fuego.papi.exception.TaskFailedException.create(TaskFailedException.java:57)
at fuego.server.AbstractProcessBean.createTaskFailedException(AbstractProcessBean.java:3572)
at fuego.fengine.FEngineProcessBean.createTaskFailedException(FEngineProcessBean.java:398)
at fuego.server.AbstractProcessBean.runTask(AbstractProcessBean.java:3193)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
at fuego.lang.JavaObject.invoke(JavaObject.java:227)
at fuego.component.Message.process(Message.java:585)
at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:780)
at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:755)
at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:142)
at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:134)
at fuego.fengine.FEngineProcessBean.processBatch(FEngineProcessBean.java:244)
at fuego.component.ExecutionThread.work(ExecutionThread.java:839)
at fuego.component.ExecutionThread.run(ExecutionThread.java:408)
at fuego.component.CustomExecution.next(CustomExecution.java:176)
at fuego.papi.impl.rmi.RMIExecution.next(RMIExecution.java:109)
at fuego.papi.impl.ProcessInstanceOperation.prepareExternalActivity(ProcessInstanceOperation.java:695)
at fuego.papi.impl.ProcessServiceSessionImpl.activityPrepare(ProcessServiceSessionImpl.java:1420)
at fuego.papi.impl.ProcessServiceSessionImpl.activityPrepare(ProcessServiceSessionImpl.java:1414)
at getinstance.prepare.main(prepare.java:43)
Caused by: fuego.lang.ComponentExecutionException: The method 'CIL_interactiveJavaPrepare' from class 'oracle.InvokeJavaProcess.Default_1_0.Instance' could not be successfully executed.
at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:519)
at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:273)
at fuego.fengine.FEEngineExecutionContext.invokeMethodAsCil(FEEngineExecutionContext.java:219)
at fuego.server.execution.EngineExecutionContext.runCil(EngineExecutionContext.java:1280)
at fuego.server.execution.TaskExecution.invoke(TaskExecution.java:401)
at fuego.server.execution.InteractiveNormalCilExecution.invoke(InteractiveNormalCilExecution.java:425)
at fuego.server.execution.TaskExecution.executeCIL(TaskExecution.java:513)
at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:697)
at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:657)
at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:154)
at fuego.server.execution.microactivity.InteractiveMicroActivity.executeNormalCil(InteractiveMicroActivity.java:501)
at fuego.server.execution.microactivity.InteractiveMicroActivity.executeItem(InteractiveMicroActivity.java:454)
at fuego.server.execution.microactivity.InteractiveMicroActivity.execute(InteractiveMicroActivity.java:104)
at fuego.server.AbstractProcessBean$48.execute(AbstractProcessBean.java:3184)
at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304)
at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:470)
at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:551)
at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
at fuego.server.execution.EngineExecution.executeImmediate(EngineExecution.java:66)
at fuego.server.AbstractProcessBean.runTask(AbstractProcessBean.java:3188)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
at fuego.lang.JavaObject.invoke(JavaObject.java:227)
at fuego.component.Message.process(Message.java:585)
at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:780)
at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:755)
at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:142)
at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:134)
at fuego.fengine.FEngineProcessBean.processBatch(FEngineProcessBean.java:244)
at fuego.component.ExecutionThread.work(ExecutionThread.java:839)
at fuego.component.ExecutionThread.run(ExecutionThread.java:408)
Caused by: java.lang.NullPointerException
at oracle.InvokeJavaProcess.Default_1_0.Instance.CIL_interactiveJavaPrepare(Instance.xcdl:1)
at oracle.InvokeJavaProcess.Default_1_0.Instance.CIL_interactiveJavaPrepare(Instance.xcdl)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:512)
... 34 more
Process exited with exit code 0.
----------------------------------------------------------------
Hi Satinder,
This time I change something in the process.
1, the process still has 3 interactive activities: jcooperkeyin, tojava, Interactivejstein.
2, I create a BPMObject including amount (decimal, 2) , purpose
3, the main task of jcooperkeyin is a screenflow: set values to purpose and amount
4, tojava activity is external.
Prepare method name: tojavaprepare
method contents:
arg1.amount=var1.amount
arg1.purpose=var1.purpose
Commit method: tojavacommit
method contents:
var1.purpose=arg2.purpose
var1.amount=arg2.amount
5, I create an instance variable name var1 and its type is BPMObjec
6, the argument module is changed to out
7, I change the java prepare method code as you commend:
8, After I run the java prepare method, I get some new errors which as follow:
--------------------------code----------------------------------------------------
package getinstance;
import fuego.lang.Decimal;
import fuego.lang.DynamicObject;
import fuego.papi.Arguments;
import fuego.papi.CommunicationException;
import fuego.papi.InstanceInfo;
import fuego.papi.ProcessService;
import fuego.papi.ProcessServiceSession;
import fuego.papi.OperationException;
import java.math.BigDecimal;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
public class prepare {
public prepare() {
public static void main(String[] args) {
prepare prepare = new prepare();
Properties configuration = new Properties();
configuration.setProperty(ProcessService.DIRECTORY_ID, "default");
configuration.setProperty(ProcessService.DIRECTORY_PROPERTIES_FILE, "D:\\BPM_HOME_standalone\\webapps\\papiws\\WEB-INF\\directory.xml");
configuration.setProperty(ProcessService.WORKING_FOLDER, "/tmp");
System.out.println("1111111111111");
Arguments argumentsResult = Arguments.create();
String taskIn = "0";
String activity = "tojava";
//String activity = "jcooperkeyin";
String processId = "/InvokeJava2#Default-1.0";
//String instanceId = "/InvokeJava2#Default-1.0/281/0";
Arguments arguments = Arguments.create();
DynamicObject dyn = DynamicObject.create();
dyn.setField("amount", new BigDecimal(100.0));
dyn.setField("purpose", "---------");
arguments.putArgument("var1", dyn);
try {
ProcessService processService = ProcessService.create(configuration);
ProcessServiceSession session = processService.createSession("jcooper", "welcome1", "host");
String ist="ist";
for (InstanceInfo instance : session.processGetInstances(processId)) {
System.out.println(" instance.getId()-> " + instance.getId());
ist=instance.getId();
System.out.println(" activity.getActivityId()-> " +instance.getActivityId());
System.out.println(" activity.getActivityName()-> " +instance.getActivityName());
System.out.println("----------111----------------------");
argumentsResult = session.activityPrepare(activity, instance.getId(), arguments); //error starts from here
System.out.println("-----2222-----------");
DynamicObject obj = argumentsResult.getDynamicObject();
Map fieldMaps = obj.asFieldsMap();
for (Iterator<String> iterator = fieldMaps.keySet().iterator(); iterator.hasNext();) {
String key = iterator.next();
System.out.println("key : "+ key + "value" +obj.getField(key));
DynamicObject obj2 = argumentsResult.getDynamicObject();
Map fieldMaps2 = obj2.asFieldsMap();
for (Iterator<String> it = fieldMaps2.keySet().iterator(); it.hasNext();) {
System.out.println("key : "+ key + " value : "+ obj2.getField(key));
System.out.println("444444444");
session.close();
} catch (OperationException e) {
e.printStackTrace();
---------------------new error------------------------------------------------------
E:\Jdeveloper10131_20090318\jdk\bin\javaw.exe -client -classpath E:\Jdeveloper10131_20090318\jdev\mywork\Java_be_invoked\getInstance\classes;D:\BPM_HOME_standalone\client\papi\lib\fuegopapi-client.jar;D:\BPM_HOME_standalone\client\papi\lib\b1base.jar;D:\BPM_HOME_standalone\client\papi\lib\b1oracle.jar;D:\BPM_HOME_standalone\client\papi\lib\b1util.jar getinstance.prepare
1111111111111
Creating connector [fuego:SQL]
Creating ProcessService with id 'oracle/2009-03-31 18:08:47+08:00'.
Local folder /tmp\system\Schema3387192-1796619082\catalogs found.
Loading catalogs from local folder: /tmp\system\Schema3387192-1796619082\catalogs
1 jars found locally.
Local jar '181' succesfully loaded.
[CatalogMgrCache] =======================
Registering CatalogMgr [oracle/2009-03-31 18:08:47+08:00] ...CatalogManagerCache 14949315:
Managers:
Counters:
[CatalogMgrCache] =======================
CatalogMgr [oracle/2009-03-31 18:08:47+08:00] REGISTERED!CatalogManagerCache 14949315:
Managers:
{oracle/2009-03-31 18:08:47+08:00=fuego.util.LocalCatalogManager@1dacccc}
Counters:
ProcessService 'oracle/2009-03-31 18:08:47+08:00' created successfully.
Unreachable Engine Tolerance (seconds):
by default: 0
to be used: 0
This papi client will not cache exceptions which imply that an engine could not be reached.
instance.getId()-> /InvokeJava2#Default-1.0/281/0
Adding local catalog for project: 181
activity.getActivityId()-> /InvokeJava2#Default-1.0/tojava
activity.getActivityName()-> tojava
----------111----------------------
[CatalogLoaderMgrCache] =======================
CatalogClassLoader[oracle/2009-03-31 18:08:47+08:00-181] added to cache
Catalog ClassLoader MAP:
{oracle/2009-03-31 18:08:47+08:00-181=CatalogClassLoader(FuegoObjectCatalog(catalogIn: 181, directoryId: oracle/2009-03-31 18:08:47+08:00))}
Catalog Manager Cache:
CatalogManagerCache 14949315:
Managers:
{oracle/2009-03-31 18:08:47+08:00=fuego.util.LocalCatalogManager@1dacccc}
Counters:
{oracle/2009-03-31 18:08:47+08:00=1}
Processing the synchronization information, instance '181:281:0' was updated.
fuego.papi.OperationException: Operation exception.
at fuego.papi.OperationException.wrap(OperationException.java:65)
at fuego.papi.impl.ProcessInstanceOperation.prepareExternalActivity(ProcessInstanceOperation.java:706)
at fuego.papi.impl.ProcessServiceSessionImpl.activityPrepare(ProcessServiceSessionImpl.java:1420)
at fuego.papi.impl.ProcessServiceSessionImpl.activityPrepare(ProcessServiceSessionImpl.java:1414)
at getinstance.prepare.main(prepare.java:58)
Caused by: fuego.rmi.RMIRuntimeException: Fuego RMI: Failure during the invocation. Check the exception chain for details.
at fuego.rmi.RemoteProxy.processBatch(RemoteProxy.java:192)
at fuego.component.ExecutorClient.dispatch(ExecutorClient.java:190)
at fuego.component.CustomExecution.next(CustomExecution.java:247)
at fuego.papi.impl.rmi.RMIExecution.next(RMIExecution.java:109)
at fuego.papi.impl.ProcessInstanceOperation.prepareExternalActivity(ProcessInstanceOperation.java:695)
... 3 more
Caused by: fuego.rmi.spi.SerializationException: Unable to receive the message because of a serialization error.
at fuego.rmi.spi.BaseConnection.send(BaseConnection.java:105)
at fuego.rmi.ServerCluster.send(ServerCluster.java:210)
at fuego.rmi.ServerCluster.sendResult(ServerCluster.java:461)
at fuego.rmi.ServerCluster.access$300(ServerCluster.java:43)
at fuego.rmi.ServerCluster$ClientRequest$1.put(ServerCluster.java:556)
at fuego.component.ExecutionThread.sendResult(ExecutionThread.java:532)
at fuego.component.ExecutionThreadContext.doClientInvoke(ExecutionThreadContext.java:695)
at fuego.component.ClientRemoteComponent.doInvocation(ClientRemoteComponent.java:303)
at fuego.component.ClientRemoteComponent.invokeRelayTo(ClientRemoteComponent.java:211)
at fuego.component.ExecutionRelayedThrowable.execute(ExecutionRelayedThrowable.java:109)
at fuego.server.execution.TaskExecution.handleExecutionRelayedThrowable(TaskExecution.java:816)
at fuego.server.execution.TaskExecution.handleComponentExecutionException(TaskExecution.java:767)
at fuego.server.execution.TaskExecution.executeCIL(TaskExecution.java:516)
at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:697)
at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:657)
at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:154)
at fuego.server.execution.microactivity.InteractiveMicroActivity.executeNormalCil(InteractiveMicroActivity.java:501)
at fuego.server.execution.microactivity.InteractiveMicroActivity.executeItem(InteractiveMicroActivity.java:454)
at fuego.server.execution.microactivity.InteractiveMicroActivity.execute(InteractiveMicroActivity.java:104)
at fuego.server.AbstractProcessBean$48.execute(AbstractProcessBean.java:3184)
at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304)
at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:470)
at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:551)
at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
at fuego.server.execution.EngineExecution.executeImmediate(EngineExecution.java:66)
at fuego.server.AbstractProcessBean.runTask(AbstractProcessBean.java:3188)
at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
at fuego.lang.JavaObject.invoke(JavaObject.java:227)
at fuego.component.Message.process(Message.java:585)
at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:780)
at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:755)
at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:142)
at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:134)
at fuego.fengine.FEngineProcessBean.processBatch(FEngineProcessBean.java:244)
at fuego.component.ExecutionThread.work(ExecutionThread.java:839)
at fuego.component.ExecutionThread.run(ExecutionThread.java:408)
... 8 more
Caused by: java.io.NotSerializableException: java.lang.Object
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at java.util.HashMap.writeObject(Unknown Source)
at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeArray(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at fuego.component.Message.writeObject(Message.java:653)
at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at fuego.component.Batch.writeObject(Batch.java:151)
at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at fuego.rmi.Packet.write(Packet.java:240)
at fuego.rmi.spi.BaseConnection.send(BaseConnection.java:102)
at fuego.rmi.ServerCluster.send(ServerCluster.java:210)
at fuego.rmi.ServerCluster.sendResult(ServerCluster.java:461)
at fuego.rmi.ServerCluster.access$300(ServerCluster.java:43)
at fuego.rmi.ServerCluster$ClientRequest$1.put(ServerCluster.java:556)
at fuego.component.ExecutionThread.sendResult(ExecutionThread.java:532)
at fuego.component.ExecutionThreadContext.doClientInvoke(ExecutionThreadContext.java:695)
at fuego.component.ClientRemoteComponent.doInvocation(ClientRemoteComponent.java:303)
at fuego.component.ClientRemoteComponent.invokeRelayTo(ClientRemoteComponent.java:211)
at fuego.component.ExecutionRelayedThrowable.execute(ExecutionRelayedThrowable.java:109)
at fuego.server.execution.TaskExecution.handleExecutionRelayedThrowable(TaskExecution.java:816)
at fuego.server.execution.TaskExecution.handleComponentExecutionException(TaskExecution.java:767)
at fuego.server.execution.TaskExecution.executeCIL(TaskExecution.java:516)
at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:697)
at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:657)
at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:154)
at fuego.server.execution.microactivity.InteractiveMicroActivity.executeNormalCil(InteractiveMicroActivity.java:501)
at fuego.server.execution.microactivity.InteractiveMicroActivity.executeItem(InteractiveMicroActivity.java:454)
at fuego.server.execution.microactivity.InteractiveMicroActivity.execute(InteractiveMicroActivity.java:104)
at fuego.server.AbstractProcessBean$48.execute(AbstractProcessBean.java:3184)
at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304)
at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:470)
at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:551)
at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
at fuego.server.execution.EngineExecution.executeImmediate(EngineExecution.java:66)
at fuego.server.AbstractProcessBean.runTask(AbstractProcessBean.java:3188)
at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
at fuego.lang.JavaObject.invoke(JavaObject.java:227)
at fuego.component.Message.process(Message.java:585)
at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:780)
at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:755)
at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:142)
at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:134)
at fuego.fengine.FEngineProcessBean.processBatch(FEngineProcessBean.java:244)
at fuego.component.ExecutionThread.work(ExecutionThread.java:839)
at fuego.component.ExecutionThread.run(ExecutionThread.java:408)
Process exited with exit code 0.
Similar Messages
-
External Task - prepared and commit method
Hey guys,
I have a problem with External Task. I don't know how make a prepared and commit method for use with J2EE Application Server.
Anyone have an example?
tksI am having some issue with the Externhal Task prepare and commit method,
Actually I am ponting the interactive activity to external Task and in the external task i am getting instanceID , participantId and activity as query paramenters.Using those query paramemeters i am initalizing the ProcessServiceSession and then making call to prepareActivate Method as below.
I am getting query string instnaceId value like " %2FScorecardChallenge%23Default-1.0%2F4%2F0 " .
And I tried to call the IntsnaceID method InstanceId.getProcessId(instanceId), but this getProcessId method gives Null value.
Is there any idea why i am getting the Null processID value for the instanceIdString " %2FScorecardChallenge%23Default-1.0%2F4%2F0 ".
My sampel code looks like below ....
String instanceId = this.getRequest().getParameter("instanceId");
String activity = this.getRequest().getParameter("activity");
String participantId = this.getRequest().getParameter("participantId");
this.getRequest().setAttribute("activity",activity);
this.getRequest().setAttribute("isFromBpm","true");
try
System.out.println("########### BPM params" + instanceId + " : " + activity + " : " +participantId);
ProcessServiceSession bpmSession = ConnectPAPI.createSession(participantId,this.getRequest().getRemoteHost());
String pid=InstanceId.getProcessId(instanceId);
System.out.println("Process ID value "+ pid);
System.out.println("Instance ID value "+ InstanceId.getInstanceId(instanceId));
System.out.println("Instance ID value "+ InstanceId.getInstanceIn(instanceId));
if(bpmSession != null)
{ try{
Arguments args = bpmSession.activityPrepare(activity,instanceId,Arguments.create());
Map argument =(Map) args.getArguments();
Iterator it = argument.entrySet().iterator();
while (it.hasNext()) {
Map.Entry pairs = (Map.Entry)it.next();
String key = (String)pairs.getKey();
Object value = pairs.getValue();
System.out.println("########### BPM args" + key + " : " + value + " : " );
But my problem here is I am getting null pointer exception like below ( I found that null pointer exception is coming because processID ivelue is null).
Stack Trace is output :
Process ID value null
Instance ID value %2FScorecardChallenge%23Default-1.0%2F4%2F0
Instance ID value -1
bpmSesssion instance details abstract class fuego.papi.ProcessServiceSesion
bpmSesssion instance is not null
java.lang.NullPointerException
at fuego.directory.DirDeployedProcess.isConsolidatedId(DirDeployedProcess.java:114)
at fuego.papi.impl.ProcessServiceSessionImpl.getProcessControl(ProcessServiceSessionImpl.java:2328)
at fuego.papi.impl.ProcessServiceSessionImpl.processGetInstance(ProcessServiceSessionImpl.java:1926)
at fuego.papi.impl.ProcessServiceSessionImpl.activityPrepare(ProcessServiceSessionImpl.java:1128)
at com.rollsroyce.gsp.poc.samplePOC.SamplePOCController.begin(SamplePOCController.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:879)
at org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)
at org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)
at org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:306)
at org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:336)
at org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute(FlowControllerAction.java:52)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:97)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$ActionRunner.execute(PageFlowRequestProcessor.java:2044)
at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.continueChain(ActionInterceptors.java:64)
at org.apache.beehive.netui.pageflow.interceptor.action.ActionInterceptor.wrapAction(ActionInterceptor.java:184)
at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.invoke(ActionInterceptors.java:50)
at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.continueChain(ActionInterceptors.java:58)
at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:87)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2116)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:556)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:853)
at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:631)
at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:158)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
Please help me , is any knows the problem......................................... -
Overriding Spark DataGrid item renderer's prepare method - renderer's child is initially null
I am currently using the 4.12.0 SDK. I have a Spark DataGrid setup that makes use of an externally-defined itemRenderer:
<s:DataGrid id="dgEquipment"
width="100%" height="100%"
doubleClickEnabled="true"
creationComplete="init()" doubleClick="popTab(event)">
<s:columns>
<s:ArrayList>
<s:GridColumn itemRenderer="renderers.equipment.IconRenderer"
dataField="EXISTING"
width="22"/>
The data provider is set programmatically after a remote call has returned a result.
I have the renderer setup as follows:
<?xml version="1.0" encoding="utf-8"?>
<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
dataChange="init()" remove="dispose()">
<s:layout>
<s:VerticalLayout horizontalAlign="center" verticalAlign="middle"/>
</s:layout>
<fx:Script>
<![CDATA[
import mx.controls.Menu;
import mx.events.MenuEvent;
import spark.components.DataGrid;
[Bindable]
[Embed(source="../../../assets/images/Icon 1.png")]
private var ico1:Class;
[Bindable]
[Embed(source="../../../assets/images/Icon 2.png")]
private var ico2:Class;
[Bindable]
[Embed(source="../../../assets/images/Icon 3.png")]
private var ico3:Class;
private var isExisting:Boolean;
private var popUp:Menu;
private function init():void
if (data)
isExisting = data.EXISTING == 1;
private function dispose():void
if (popUp)
popUp.removeEventListener(MenuEvent.ITEM_CLICK, popUp_click);
popUp = null;
if (imgActions)
imgActions.removeEventListener(MouseEvent.CLICK, image_click);
imgActions = null;
override public function prepare(hasBeenRecycled:Boolean):void
if (data)
if ((data.TYPE == "A" || data.TYPE == "B") && !data.X && !data.Y)
disableLink();
imgActions.source = ico3;
imgActions.toolTip = "Blah blah.";
else if (data.TYPE == "C" || data.TYPE == "D")
disableLink();
else if (isExisting)
imgActions.source = ico1; //****************************** imgActions.toolTip = "More blah blah.";
imgActions.addEventListener(MouseEvent.CLICK, image_click);
else
imgActions.source = ico2;
imgActions.addEventListener(MouseEvent.CLICK, image_click);
imgActions.toolTip = "Even more blah blah.";
initPopUp();
private function initPopUp():void
private function popUp_click(event:MenuEvent):void
private function image_click(event:MouseEvent):void
private function disableLink():void
]]>
</fx:Script>
<s:Image id="imgActions"
height="18" width="18"/>
</s:GridItemRenderer>
When the code reaches the line where I have added a comment full of asterisks, I get the following error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at renderers.equipment::IconRenderer/prepare()[C:\…\renderers\equipment\IconRenderer.mxml:81 ]
at spark.components.gridClasses::GridViewLayout/initializeItemRenderer()[/Users/justinmclean /Documents/ApacheFlex4.12.0/frameworks/projects/spark/src/spark/components/gridClasses/Gri dViewLayout.as:1808]
at spark.components.gridClasses::GridViewLayout/createTypicalItemRenderer()[/Users/justinmcl ean/Documents/ApacheFlex4.12.0/frameworks/projects/spark/src/spark/components/gridClasses/ GridViewLayout.as:1243]
at spark.components.gridClasses::GridViewLayout/updateTypicalCellSizes()[/Users/justinmclean /Documents/ApacheFlex4.12.0/frameworks/projects/spark/src/spark/components/gridClasses/Gri dViewLayout.as:1374]
at spark.components.gridClasses::GridViewLayout/measure()[/Users/justinmclean/Documents/Apac heFlex4.12.0/frameworks/projects/spark/src/spark/components/gridClasses/GridViewLayout.as: 875]
at spark.components.supportClasses::GroupBase/measure()[/Users/justinmclean/Documents/Apache Flex4.12.0/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as:1156 ]
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::measureSizes()[/Users/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/framework/src/mx/cor e/UIComponent.as:9038]
at mx.core::UIComponent/validateSize()[/Users/justinmclean/Documents/ApacheFlex4.12.0/framew orks/projects/framework/src/mx/core/UIComponent.as:8962]
at spark.components::Group/validateSize()[/Users/justinmclean/Documents/ApacheFlex4.12.0/fra meworks/projects/spark/src/spark/components/Group.as:1074]
at mx.managers::LayoutManager/validateSize()[/Users/justinmclean/Documents/ApacheFlex4.12.0/ frameworks/projects/framework/src/mx/managers/LayoutManager.as:673]
at mx.managers::LayoutManager/doPhasedInstantiation()[/Users/justinmclean/Documents/ApacheFl ex4.12.0/frameworks/projects/framework/src/mx/managers/LayoutManager.as:824]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[/Users/justinmclean/Documents/ ApacheFlex4.12.0/frameworks/projects/framework/src/mx/managers/LayoutManager.as:1188]
Running the debugger shows that this occurs with the first item in the data provider. If I alter the prepare method to check for the existence of imgActions before doing anything, everything works fine after the first item. So I'll have one row in the DataGrid with a missing icon, and all the rest will have icons.
So the question is, is it normal for prepare to run before any children of the item renderer are created? If so, how should I handle this?
Many thanks in advance.A little more info. I added some event handlers to the renderer and the image (for events that I thought would be relevant), and here is the order of events based on trace statements within the handlers:
griditemrenderer1_addedHandler
griditemrenderer1_addedToStageHandler
griditemrenderer1_preinitializeHandler
imgActions_addedHandler
griditemrenderer1_addedHandler
imgActions_addedToStageHandler
imgActions_preinitializeHandler
imgActions_addedHandler
griditemrenderer1_addedHandler
imgActions_initializeHandler
griditemrenderer1_elementAddHandler
imgActions_addHandler
griditemrenderer1_initializeHandler
griditemrenderer1_addHandler
prepare called
imgActions_resizeHandler
griditemrenderer1_resizeHandler
imgActions_creationCompleteHandler
imgActions_updateCompleteHandler
griditemrenderer1_creationCompleteHandler
griditemrenderer1_updateCompleteHandler
griditemrenderer1_removeHandler
griditemrenderer1_addedHandler
griditemrenderer1_addedToStageHandler
imgActions_addedToStageHandler
griditemrenderer1_addHandler
griditemrenderer1_dataChangeHandlerTypeError: Error #1009: Cannot access a property or method of a null object reference.
prepare called
at renderers.equipment::IconRenderer/prepare()[C:\…\renderers\equipment\IconRenderer.mxml:91 ]
imgActions_renderHandler
griditemrenderer1_renderHandler -
External task and Multiple-join
In a process, the order of activities is: Begin->interactive activity A -> multiple -> interactive activity B -> Join -> interactive activity C
This process has 2 instance variable, var1 and var2.
var1's type is BPMObject
var2's type is String.
PBL code in Mulitple is as follow.
---------------------------Multiple------------------------------
participants as Participant[]
ts as String[]
ts=var1.selectParticipants;
v as Int
v=length(ts)-1
for i2 in 0..v
do
participants(i2)=Participant.find(name : ts(i2))
end
for each p in participants do
copy = clone(this)
copy.participant.next = p
copy.var1.voteResult="O"
end
The main task type of interactive activity B is set to external.
The PBL code in the interactive activity B is as follow
------------------------interactive activity Prepare--------------------------------------------------------
var1.voteResult=arg1
arg2=var1.voteResult
arg1 and arg2 in this interactive activity are fine.
Interactive activity B does not have a commit method .
The PBL code in the Join is below.
---------------------------------------------------Join-----------------------------------------------
var2=var2+"*"+copy.var1.voteResult
I also try: this.var2=this.var2+"*"+copy.var1.voteResult
However, it only outputs *
It only output *. The number of * equals the number of branch.
The main task of Interactive activity C is an external task.
This activity only has a very simple prepare method: arg1=var2
arg 1 is the argument. I just want to see the value of var2. However, the value of var2 is just *
I cannot get the value of each branch.
How to get the correct value of each branch?I change the value type to Int. Then, it works.
How to get the value of String type? -
Hi
I have tried to look everywhere for some tutorial or example on how to use external tasks (in Oracle BPM 10gr3). What must be done in the studio and what has to be done in the code. Does anyone have any examples or tutorials on how to use external tasks? What exactly means prepare method? Is it that when (external) client calls prepareExternalActivity()-method, this specified method in BPM-engine is executed. But how exactly this can be done?
Another question is that does Oracle BPM 10gr3 support asynchronous web services ? Can I call asynchronous web service from process?
Thanks for advance
Best Regards TuomasIf you look at the Variables view on the left when editing your prepare method there should be an arguments section. An argument marked as an output argument in this method will be passed to the client when the prepare method is called. Passing a BPM Object will require a lot more code on the client side though, because those class definitions won't exist there. The simpler way is to pass out a Java object that is cataloged into BPM and have the same java class on the client side, or pass out a XML string that can be parsed by the client then.
-
I'm trying to use the implementation type "External" of interactive activities, but I'm having some difficulties. I don't understand how I make the client, also I don't know how the BPM engine knows whom to call.
Does anyone have any sample project that can send me?
Rodrigo ZuchettoHi Rodrigo
You can follow the following steps
In BPM
1. Under External Resource, create a new resource of type 'Server Configuration'. Specify your host, port and the servlet/jsp path.
2. For the main task of interactive activity, choose implementaion type as 'External'.
3. Create a prepare and commit method. Prepare method will be called from your servlet, and you can define arguments (as output args) that will be passed from BPM to your external java app
4. Commit method will be called from your java app, once you are done with the processing. You can define args (as input) here. These args will be set from java app when it calls this commit method.
In JavaApp
1. For the servlet you define in step 1 above, define a default handler and initialize a papi session here.
2. Call activityPrepare on this papisession, and get hold of the variables passed from step 3 above
3. Do your processing
4. Call activityCommit on the papisession and pass back the parameters
HTH -
11g Task flow - Method call with router Issue
Hi, I am using bounded task flow method call - which is default activity. The outcome of method call will go to a router and that decides which method/page fragment has to be selected. But when ever i try to call the default activity only the default out come of the router (Page fragment) is shown in the jspx. When click on some button which is binded with the default activity - the task flow is not working as i expected. Pls find the code of my task flow below.
<?xml version="1.0" encoding="windows-1252" ?>
<adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
<task-flow-definition id="methodcall2task-flow-definition">
<default-activity>initiatetaskflow</default-activity>
<data-control-scope>
<shared/>
</data-control-scope>
<input-parameter-definition>
<name>methodname</name>
<value>#{CompanyBean.methodname}</value>
</input-parameter-definition>
<managed-bean>
<managed-bean-name>CompanyBean</managed-bean-name>
<managed-bean-class>com.boeing.seds.view.company.CompanyBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<method-call id="initiatetaskflow">
<method>#{CompanyBean.test}</method>
<outcome>
<fixed-outcome>#{CompanyBean.methodname}</fixed-outcome>
</outcome>
</method-call>
<router id="selectMethod">
<case>
<expression>#{CompanyBean.methodname eq 'default'}</expression>
<outcome>default</outcome>
</case>
<case>
<expression>#{CompanyBean.methodname eq 'addcompany'}</expression>
<outcome>addcompany</outcome>
</case>
<case>
<expression>#{CompanyBean.methodname eq 'gotoAddress'}</expression>
<outcome>gotoAddress</outcome>
</case>
<case>
<expression>#{CompanyBean.methodname eq 'gotoDist'}</expression>
<outcome>gotoDist</outcome>
</case>
<default-outcome>gotoAddress</default-outcome>
</router>
<view id="default">
<page>/includes/company/default.jsff</page>
</view>
<view id="addnewcompanyFrgmt">
<page>/includes/company/addnewcompanyFrgmt.jsff</page>
</view>
<method-call id="methodCall1">
<method>#{CompanyBean.addCompany}</method>
<outcome>
<to-string/>
</outcome>
</method-call>
<view id="supplierAddressFrgmt">
<page>/includes/company/supplierAddressFrgmt.jsff</page>
</view>
<view id="supplierDistributorFrgmt">
<page>/includes/company/supplierDistributorFrgmt.jsff</page>
</view>
<control-flow-rule>
<from-activity-id>initiatetaskflow</from-activity-id>
<control-flow-case>
<from-outcome>#{CompanyBean.methodname}</from-outcome>
<to-activity-id>selectMethod</to-activity-id>
</control-flow-case>
</control-flow-rule>
<control-flow-rule>
<from-activity-id>selectMethod</from-activity-id>
<control-flow-case>
<from-outcome>default</from-outcome>
<to-activity-id>default</to-activity-id>
</control-flow-case>
<control-flow-case>
<from-outcome>addcompany</from-outcome>
<to-activity-id>methodCall1</to-activity-id>
</control-flow-case>
<control-flow-case>
<from-outcome>gotoAddress</from-outcome>
<to-activity-id>supplierAddressFrgmt</to-activity-id>
</control-flow-case>
<control-flow-case>
<from-outcome>gotoDist</from-outcome>
<to-activity-id>supplierDistributorFrgmt</to-activity-id>
</control-flow-case>
</control-flow-rule>
<control-flow-rule>
<from-activity-id>methodCall1</from-activity-id>
<control-flow-case>
<from-outcome>goAddNew</from-outcome>
<to-activity-id>addnewcompanyFrgmt</to-activity-id>
</control-flow-case>
</control-flow-rule>
<use-page-fragments/>
</task-flow-definition>
</adfc-config>
Kindly let me know what may be the issue and help me to resolve it.
Thanks!
Sankari KannanHi Sankari,
Since after the initial method call, your control flow has the router as its next stop, the //method-call/method/outcome/fixed-outcome can be set to a literal value(go to router) instead of an EL.
And let router decide where to go next(by EL).
Or you can discard your router activity, let the method-call activity decide where to go directly by setting //method-call/method/outcome/to-string to "true". Then the return value of the method decide the next stop.
Todd -
Prepare() method gridItemRenderer Flex Hero
Hi,
last week I installed Flash Builder Burrito to try the new spark dataGrid. I was testing the gridItemRenderer. I wanted to check something form the data and according to the results the item renderer should show three different conditions. But unfortunately I was unable to make the prepare() function work. I did it as was shown in Adobe TV (Deep Dive into Spark DataGrid) but even a trace() was not triggered.
Is this method not working or am I making something wrong?
Thanks for your help.The Link is:
http://tv.adobe.com/watch/max-2010-develop/deep-dive-into-the-spark-datagrid-component-and -item-renderers-/
I created a dataGrid and inserted the following column:
<s:GridColumn dataField="status" headerText="VP" itemRenderer="itemRenderer.FirstItemRenderer">
which uses FirstItemRenderer as ItemRenderer. Here the code for FirstItemRenderer:
<?xml version="1.0" encoding="utf-8"?>
<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
>
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
// You SHOULD be able to use this method to programatically
// change the appearance of the data in this cell. However it doesn't
// seem to be called, yet. Probably a work in progress.
override public function prepare( willBeRecycled:Boolean ):void {
labelSatus.text = "Result";
/* protected function griditemrenderer1_creationCompleteHandler(event:FlexEvent):void
labelSatus.text = "Result";
]]>
</fx:Script>
<s:Label id="labelSatus"/>
</s:GridItemRenderer>
If I use the prepare method, the dataGrid is not populated with the label text "Result". But if I add a creationComplete Event to GridItemRenderer, the dataGrid column is populated with the "Result" text.
So, my question is am I using the prepare function wrong? Can you show me how to use it to make conditional checks on the data source?
Thanks in advance, -
Interactive activity, external task example???
Hi,
I'm trying to search for a simple external task example, however it is totally imposible to find anything ... :(
I would like to make a few questions about it. When you create an external task in a interactive activity, you can specify an URL where the request will be redirected when you click on a external task, but how do you send the information about the specific process you want to work with in the URL? is it possible to pass parameters to this URL ? which is exactly the correct use of the external URL configuration? if I pass the control to an external system, how this system is able to know which BPM process instance to work with?
Regards,
Antonio.Hi,
I've recently found out that Aqualogic simply sends the information about the process as request parameters to the external system:
taskIn:0
activity:TareaExterna
instanceId:/ExpenseReport#Default-1.0/6/0
participantId:Peter Jones
Very easy, however it is quite frustrating not finding anything about it. I agree with you that it is an upcoming technology, however the documentation of a product should have a minimum of quality, specially coming from an important company as BEA. They offer a functionality and simply do not explain how it works.
In any case, thanks a lot for answering my question!! :)
Best regards,
Antonio. -
Binding between Task and method dissappears
The binding between task and method is dissappearing .
I tried creating a new task altogether but still not working
kindly help
Edited by: kittu reddy on May 6, 2008 3:19 PMI have Zmethod and i have done binding between the task and the method and
Task and workflow..
Binding between Task and work flow doesnt seem to Disappear
but the binding between Task and the method kept on disappearing
I have a Zmethod to Bus2091(delagated to Zbus2091)
with an import parameter and an export parameter
and now when creating the task and assigning the method the container elements of method are transferred to Task
and next i wen to binding eeditor and generated automatic binding:
From task to method
and method to task
with out errors and now on clicked green tick mark of the binding editor and saved the Task and now on checking back the binding editor
i find the binding disppearead -
How to decode encoded string for javascript
This is encoded HTML code to be used at javascript function
<div class=\"ProductDetail\"><div style=\"width:780px\">\r\n\t<div class=\"baslik\" style=\"margin: 0px; padding: 5px 10px; border-width: 5px 0px 1px; border-top-style: solid; border-bottom-style: solid; border-top-color: rgb(255, 255, 255); border-bottom-color: rgb(153, 165, 165); vertical-align: baseline; color: rgb(0, 0, 0); clear: both; line-height: 14px; font-family: 'Lucida Grande', sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(219, 223, 226);\"> Di\u011fer \u00d6zellikler<\/div><\/div><\/div>
When decoded properly it becomes below
<div class="ProductDetail"><div style="width:780px">
<div class="baslik" style="margin: 0px; padding: 5px 10px; border-width: 5px 0px 1px; border-top-style: solid; border-bottom-style: solid; border-top-color: rgb(255, 255, 255); border-bottom-color: rgb(153, 165, 165); vertical-align: baseline; color: rgb(0, 0, 0); clear: both; line-height: 14px; font-family: 'Lucida Grande', sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(219, 223, 226);"> Diğer Özellikler</div></div></div>
This website has both decode and encode features
http://www.freeformatter.com/javascript-escape.html#ad-output
I could find HttpUtility.JavaScriptStringEncode at c# however i couldn't find any function class etc to decode encoded string
So i need help about how to decode like that website does
.net 4.5 c#
Browser based Pokemon Style MMORPG Game Developer Used asp.net 4.0 routing at it's
MonstersHi
Monster,
For web questions related to ASP.NET use the
ASP.NET forum
You should get more, better and faster answers on the other forum. Thanks, ahead of time.
Thanks
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Hi Everyone,
Have any body used external task for an interactive activity. If any body have samples to call prepareExternalActivity() and commitExternalActivity( ) from a standalone java program please help?
ThanksHi Nick,
Thanks for help!
My bat file runs without any errors from external tasks in EDQ.
The account has full control on all the shared folders i am using.
My script:
set ss_temp_dir=D:\Datanomic\dnDirector\config\landingarea\EDQ_Notification
echo s1 > log.txt
set srm_analyzer_path=\\<appsrvr4>\d$\sba81\siebsrvr\BIN
echo s2 >>log.txt
COPY /Y \\<appsrvr1>\d$\sba81\siebsrvr\BIN\*.fdr \\qssdvucmgtw301\siebfile\FDR
COPY /Y \\<appsrvr2>\d$\sba81\siebsrvr\BIN\*.fdr \\qssdvucmgtw301\siebfile\FDR
COPY /Y \\<appsrvr3>\d$\sba81\siebsrvr\BIN\*.fdr \\qssdvucmgtw301\siebfile\FDR
:: The above copy is not working from EDQ - no files copied - running the commands from cmd or double clicking the bat works fine for all commands.
echo s3 >>log.txt
:: log s1-s2-s3 created in commandarea.
setLocal DisableDelayedExpansion
pushd \\<sharedloc>\siebfile\FDR\
setLocal EnableDelayedExpansion
echo s4 >>log.txt
for /f "tokens=* delims= " %%G in ('dir/b/od T*.fdr') do (set newest=%%G)
echo s5 >>log.txt
copy %newest% %ss_temp_dir%
echo s6 >>log.txt
:: log s4-s5-s6 created in \\<sharedloc>\siebfile\FDR\
pushd %ss_temp_dir%
echo s7 >>log.txt
for %%F in (%ss_temp_dir%\*.fdr) do (
::set outfile=%ss_temp_dir%\%%~nF.csv &&
%srm_analyzer_path%\sarmanalyzer.exe -o %ss_temp_dir%\Snapshot_Working_CSV.csv -x -f %%F
:: The above saqrm_analyzer is not working from EDQ - no files copied - running the commands from cmd or double clicking the bat works fine for all commands.
echo s8 >>log.txt
MOVE /Y %ss_temp_dir%\*.fdr %ss_temp_dir%\BU\
echo s9 >>log.txt
:: The above move is not working from EDQ - no files copied - running the commands from cmd or double clicking the bat works fine for all commands.
::Log s7-s8-s9 created in %ss_temp_dir%
Thanks,
Sid -
Team, can you someone help me on External Task.
I see Command, Working Directory and Arguments on External Task.
Header 1
Header 2
Command
java -jar jmxtools.jar runjob -job TestProject -project ABC -u dnadmin localhost:8090
Working Directory
\opt\local\software\edq\tools
Arguments
I am getting error "....... is not located in one of the designated command areas.
I tried even specified like below still no luck, someone please help me with this.. Thanks in advance!!!
Header 1
Header 2
Command
java -jar jmxtools.jar runjob
Working Directory
\opt\local\software\edq\tools
Arguments
-job TestProject -project ABC -u dnadmin localhost:8090
Thanks in advance!Hi,
See the online help section on external tasks - particularly the section regarding security considerations.
I suggest you put your "java -jar jmxtools.jar ........." command in a batch/file and drop this in the config/commandarea folder. Use the name of the batch file/script as the 'command' parameter of the executable external task.
regards,
Nick -
External task - run batch file as administrator
Hi,
My name is Sid. I am working on developing an EDQ project to parse a collection of log files.
I have run into a roadblock on the first step!
My EDQ server is on a Windows Server 2008 platform.
I am calling a batch file that copies these log files between two locations.
The batch file copies the files fine when i run it as administrator from the commandarea in EDQ server, but it does not work when called from the External Tasks in EDQ.
I tried using the runas user:/Administrator in the batch file but that does not work either.
Would greatly appreciate any pointers in this regard.
Thank You,
SidWith runas you in fact logon to another seesion. So cmd is started with his own starting directory (being where it is located, system32).
I would recommend never to rely on the working dir for a batch file or script, but to always include the full path to the needed command/executables. If needed you can use environment variables to get the pathes of user-customised folders (for example the %usersprofile% variable).
Using .lnk files (normal shortcuts) you can specify the working dir to start in if you would really need that functionality.
MCSA/MCTS/MCP -
Does Stop task reset a quadrature encoder counter?
I am using an M-Series PCI-6280 board, with one of its onboard counters wired as a quadrature encoder.
1)I start the counter task, take a set of measurements with the counter, and then stop the task.
2) The encoder which the encoder counter is monitoring continues to output quadrature encoder signals into the PCI board's counter.
3) I start the task again, and perform another set of measurements.
Which of the following occurs?
Upon starting the task again, the counter's previous value was wiped and the measurements taken in (3) start at 0 counts.
The counter keeps the value it had before it was stopped and subsequently started, and the measurements in (3) cumulate on top of the measurements taken in (1).
The counter keeps the value it had before it was stopped, continues to increment/decrement position in (2) even after the task is stopped, and when the task is started in (3) the counter value is cumulative with the quadrature encoder pulses in (1) and (2).
Thanks in advance for the help.
Solved!
Go to Solution.Hello acmap,
In this case The behavior will be the following:
Upon starting the task again, the counter's previous value was wiped and the measurements taken in (3) start at 0 counts.
However, you can specify the initial count value of the counter on the Initial Count terminal of the DAQmx Start Task VI, so it doesn't have to start at zero, and you can implement the behavior described in your second option.
Daniel
Maybe you are looking for
-
How can I start a new paragraph within the same table cell?
In Numbers, when adding text within a table frame, how can I start a new line within the same frame (rather than advancing to the next cell)? I'd like to enter a mini-list of several items of various lengths of data.
-
Substitution not working for transaction F110
Hi Folks , I have created a Substitution for FI transactions for substituting a Header field. I have added 3 transactions (F-28, FB01 and F110) to the pre requisite of the substitution. The susbtitution works perfectly fine for the transaction FB01 a
-
Flex 3: Update SQLite Table Structure?
I don't have any issues with creating my table when it doesn't exist but I have a quesion about updating the table structure. For instance I want to add two new fields if they don't exist. Does anyone have an example of updating table structure? Pr
-
Cannont run executable​s in Windows 8
This problem has been probably solved, but I could not find a thread in this forum to explain whats the solution to the below problem: We have developed a software pacakge in LabView 2012 SP1. The installation works fine in all versions of Windows fr
-
Disabling third party apps upon startup
Is it possible? Iphone 4S, IOS 8.1 Thanks