These are chat archives for effektif/effektif

2nd
Nov 2015
havid0707
@havid0707
Nov 02 2015 06:28
@tombaeyens Hi,I have an question about multi-instance,if the activity type is not "auto end" such as ReveiveTask, how can I get the reference to these instance and send them messages? Thanks a lot
havid0707
@havid0707
Nov 02 2015 07:47
'''
public WorkflowInstance send(Message message, WorkflowInstanceImpl workflowInstance) {
String activityInstanceId = message.getActivityInstanceId();
ActivityInstanceImpl activityInstance = workflowInstance.findActivityInstance(activityInstanceId);
if (activityInstance==null) {
workflowInstanceStore.unlockWorkflowInstance(message.getWorkflowInstanceId());
throw new RuntimeException("Activity instance "+activityInstanceId+" not in workflow instance");
}
if (log.isDebugEnabled())
log.debug("Signalling "+activityInstance);
ActivityImpl activity = activityInstance.getActivity();
activity.activityType.message(activityInstance, message);
workflowInstance.executeWork();
return workflowInstance.toWorkflowInstance();
}
'''
workflowInstance.executeWork() after activityType.message(),but this activityInstance should enter the workflowInstance Task queue first?
Tom Baeyens
@tombaeyens
Nov 02 2015 07:55
In ActivityType.execute you have the workflow instance id and the activity instance id. In that method you can 'send' it to wherever you want. Eg you could create a collection containing all the work that has to be done by a given activity type. And/or you could send a http notification in that execute method as well
havid0707
@havid0707
Nov 02 2015 08:43
@tombaeyens Thanks,for the multi-instances case I posted at 14:28, I want to know , this feature is completed? I have not found further logic after multi-instance created
havid0707
@havid0707
Nov 02 2015 08:54
@tombaeyens maybe it's suitable for Call/Adapter Activity.. just as an "trigger" . if so,it is ok
Tom Baeyens
@tombaeyens
Nov 02 2015 12:51
P