04-20-2015 08:25 AM
04-21-2015 02:30 AM
05-13-2015 02:51 AM
05-13-2015 08:15 AM
05-13-2015 08:47 AM
05-18-2015 10:59 AM
05-18-2015 11:39 AM
05-26-2015 04:03 AM
01-22-2017 01:42 AM
is any code snippet for this question?
01-26-2017 03:16 PM
Something like this should work....
1. create a command:
/**
* @author Greg Harley - BP3
*/
public class MoveTokenCmd implements Command<Void>, Serializable {
private static final long serialVersionUID = 1L;
protected String executionId;
protected String targetActivityId;
public MoveTokenCmd(String executionId, String targetActivityId) {
this.executionId = executionId;
this.targetActivityId = targetActivityId;
}
public Void execute(CommandContext commandContext) {
ExecutionEntity execution = commandContext.getExecutionEntityManager().findExecutionById(this.executionId);
execution.setActivity(execution.getProcessDefinition().findActivity(this.targetActivityId));
AtomicOperation.TRANSITION_CREATE_SCOPE.execute(execution);
return null;
}
}
2. Call the command from the management service:
// Set the new activity
managementService.executeCommand(new MoveTokenCmd(executionId, targetActivityId));
Obviously you will need to have the target activity id and execution id, but I will leave that for you to handle.
Cheers,
Greg
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.