Is it possible to get the name of the parent when using CallActivity ?For instance:I have a workflow called parentWorkflow which calls a subworkflow using callActivity.In this subworkflow I have a service task where I want to get the name of the callActivity task that triggered the subworkflow.My servicetask in the subworkflow looks likes this:
public void yetAnotherServiceMethod(ExecutionEntity execution)
{
String parameter = (String)execution.getVariable("outputparameter");
}
Through the ExecutionEntity I can get the ID of the CallActiviti task but not the name.I have a workaround for it, but don't prefer to use it …
public void yetAnotherServiceMethod(ExecutionEntity execution)
{
String parameter = (String)execution.getVariable("outputparameter");
Map map = new HashMap();
map = (Map)execution.getSuperExecution().getActivity().getProperties();
String name = (String)map.get("name");
System.out.println("Calling service task: " + name);
}
It would be nicer if I could do something like this:
String name = execution.getSuperExecution().getActivityName();
The following method does exist:
String myId = execution.getSuperExecution().getActivityId();