AnsweredAssumed Answered

Cannot get parent id from a sub process

Question asked by cgideon on Jul 1, 2014
Latest reply on Jul 3, 2014 by trademak

I just picked up a project using Activiti and I have run into an issue. I have a Spring WebFlow application where we're using Activiti to control different business models. I'm currently having an issue though with a subprocess flow not being able to get the id of it's parent even though there are other flows in the project that are working perfectly fine and they are declared the same way.

Depending on which option the user clicks on in our app there are two different url patterns that can be called:

        <c:when test="${process.type == 'replace_card_request'}">
            <a href="replace-card.html?instanceId=${}"><ui:insert/></a>
        <c:when test="${process.type == 'replace_card_badge'}">
            <a href="replace-card.html?instanceId=${}"><ui:insert/></a>

In my bpmn file I have it calling the sub process like so using a callActivity:

<callActivity id="badges" calledElement="replace_card_badge">
            <extensionElements>{various activiti:in variables</extensionElements>
            <multiInstanceLoopCharacteristics isSequential="false" activiti:collection="${badges}" activiti:elementVariable="badge"/>

The called sub process is a simple process with a single start event, sequence flow, user task, sequence flow and an end event.

<process id="replace_card_badge">
      <startEvent id="start" />

      <sequenceFlow sourceRef="start" targetRef="replace_card_badge_security" />

      <userTask id="replace_card_badge_security">

      <sequenceFlow sourceRef="replace_card_badge_security" targetRef="end" />

      <endEvent id="end" />

But when in the second url is called the id is empty which causes a server 500 error. I'm pretty stumped on this so any help would be greatly appreciated.