cancel
Showing results for 
Search instead for 
Did you mean: 

How to properly start a new process from inside a service task ?

guillaume1
Champ on-the-rise
Champ on-the-rise
Hello,

I have created a custom palette element following the user guide about this topic.

This new activity is in fact a 'configuration mask' for a CallActivity with a complex input map.

So the execute method of the JavaDelegate that is called by this custom palette element at runtime is like this:

<java>
@Override public void execute(DelegateExecution execution) throws Exception {
   // prepare the variables from the execution

    runtimeService.startProcessInstanceByKey("ProcessToStart", execution.getVariables());
  }
<java>

It works, but then I have a problem with historical queries:
processes started with way don't have any parentId.

So my questions:
- Is it the right way to do? Should I change the type of the javaDelegateClass used in my custom component ? If not what should I use ?
- If it is the right way, how should I start the sub process in order to have a parent defined to it ?
12 REPLIES 12

jbarrez
Star Contributor
Star Contributor
Seems to be an older version of Eclips, no. Maybe verify if it's still the same on the latest version?

guillaume1
Champ on-the-rise
Champ on-the-rise
Same issue with latest eclipse: the palette is loaded when I start a new project, but trying to use the palette in my current project does not work until I open a blank process in a side empty project.

Something must be wrong with my current project settings.

Many thanks for all your help.

jbarrez
Star Contributor
Star Contributor
Strange - sorry we can't help you much further in this Smiley Sad
Do post an update if you would find a solution. Maybe more people suffer from this!