Bug 1128357 - Roundtripping of custom work items does not work properly
Summary: Roundtripping of custom work items does not work properly
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: jBPM Designer
Version: 6.0.2
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ER5
: 6.1.0
Assignee: Tihomir Surdilovic
QA Contact: Jozef Marko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-09 11:31 UTC by Anton Giertli
Modified: 2020-03-27 18:38 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 18:38:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
[0] roundtripping (jbds project) (27.78 KB, application/zip)
2014-08-09 11:31 UTC, Anton Giertli
no flags Details
[1] process round tripping (4.69 KB, application/xml)
2015-01-05 14:11 UTC, Anton Giertli
no flags Details

Description Anton Giertli 2014-08-09 11:31:37 UTC
Created attachment 925367 [details]
[0] roundtripping (jbds project)

Description of problem:

If you try to import JBDS process definition, which includes custom work items into the Web Designer it does not works properly.

Failing with "Task node 'NAME' [1] has no work name." during the project build.

Version-Release number of selected component (if applicable):
 bpm 6.0.2

  BPMN2 Modeler - Diagram Editor	1.0.2.201402102317	org.eclipse.bpmn2.modeler.feature.feature.group	Eclipse.org

How reproducible:
always

Steps to Reproduce:
1. Create simple process definition in the JBDS, which includes at least one custom work item.
2. Open business-central, and add the same work item definition into the business-central project
3. Import the JBDS process into the Web Designer, save it and try to build project.

It fails with
[-1,-1]: Process 'Default Process' [roundtripping]: Task node 'ApplyOntology' [1] has no work name.
[-1,-1]: Process 'Default Process' [roundtripping]: Task node 'QuerySRAMP' [3] has no work name.


Actual results:
Roundtripping between JBDS <--> Web Designer is not possible with the custom work items included in the process definition

Expected results:
Roundtripping between JBDS <--> Web Designer is possible with the custom work items included in the process definition


Additional info:

JBDS project with the roundtripping.bpmn process attached - just import this process into the Web Designer and try to build it.

Comment 1 Anton Giertli 2014-08-09 11:34:02 UTC
Please note that you must append content of

/business-assets/src/main/resources/META-INF/workitemdef.wid

to the WorkItemDefinitions file, which is located in the business-central project once you create your first process definition.

Once you are done, proceed with the process import.

Comment 3 Tihomir Surdilovic 2014-12-15 18:43:18 UTC
I am unable to reproduce this issue. The only difference is that I created a new workitem definition in the workbench pasting the contents of the one attached to this BZ instead of appending it to the one existing. Maybe the issue here is when appending that the format of the wid was corrupted. 

need more info on how to reproduce this because given the provided wid file designer is able to round-trip a sample process using the two custom workitems in my tests fine.

Comment 4 Anton Giertli 2015-01-05 14:10:56 UTC
Tiho, 

I have tried the same way as you have described - i.e. create the new wid file in business-central and copy the content there.

Result? Same issue.
Process 'Sample Process' [com.sample.bpmn]: Task node 'QuerySRAMP' [2] has no work name.

How are you importing process? What version of product do you use? Are you sure you are trying with the latest product and not some community bits? I have performed this last test with BPMS 6.0.3 + roll up patch #1 applied.

I am also attaching the sample process I have used for roundtripping.

Cheers,
Anton

Comment 5 Anton Giertli 2015-01-05 14:11:16 UTC
Created attachment 976461 [details]
[1] process round tripping

Comment 6 Tihomir Surdilovic 2015-01-12 17:10:59 UTC
I understand the problem now. The BPMN2 you provided does not define data input of "TaskName" which is needed to associate the task to a specific type. If you import the following BPMN2 which is based on your example + the addition of the TaskName data input and the corresponding association to specify its value, the process imports fine (given that there is a wid present with the definition of the custom task in the project):


***********************
<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:tns="http://www.jboss.org/drools" xmlns="http://www.jboss.org/drools" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd http://www.jboss.org/drools drools.xsd http://www.bpsim.org/schemas/1.0 bpsim.xsd" id="Definition" expressionLanguage="http://www.mvel.org/2.0" targetNamespace="http://www.jboss.org/drools" typeLanguage="http://www.java.com/javaTypes">
<bpmn2:itemDefinition id="ItemDefinition_1" structureRef="StringDataType"/>
<bpmn2:itemDefinition id="ItemDefinition_2" structureRef="IntegerDataType"/>
<bpmn2:process id="com.sample.bpmn" tns:version="1" tns:packageName="defaultPackage" tns:adHoc="false" name="Sample Process" isExecutable="true" processType="Private">
  <bpmn2:startEvent id="_1" name="">
    <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
  </bpmn2:startEvent>
  <bpmn2:task id="Task_1" tns:taskName="QuerySRAMP" tns:displayName="Query S-RAMP repository for Services" tns:icon="icons/defaultservicenodeicon.png" name="QuerySRAMP">
    <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
    <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
    <bpmn2:ioSpecification id="_InputOutputSpecification_2">
      <bpmn2:dataInput id="TaskNameInputX" name="TaskName"/>
      <bpmn2:dataInput id="_DataInput_2" itemSubjectRef="ItemDefinition_1" name="host"/>
      <bpmn2:dataInput id="_DataInput_3" itemSubjectRef="ItemDefinition_2" name="port"/>
      <bpmn2:dataInput id="_DataInput_4" itemSubjectRef="ItemDefinition_1" name="username"/>
      <bpmn2:dataInput id="_DataInput_5" itemSubjectRef="ItemDefinition_1" name="password"/>
      <bpmn2:inputSet id="_InputSet_2"/>
      <bpmn2:inputSet id="_InputSet_3" name="New Input Set">
        <bpmn2:dataInputRefs>_DataInput_2</bpmn2:dataInputRefs>
        <bpmn2:dataInputRefs>_DataInput_3</bpmn2:dataInputRefs>
        <bpmn2:dataInputRefs>_DataInput_4</bpmn2:dataInputRefs>
        <bpmn2:dataInputRefs>_DataInput_5</bpmn2:dataInputRefs>
        <bpmn2:dataInputRefs>TaskNameInputX</bpmn2:dataInputRefs>
      </bpmn2:inputSet>
      <bpmn2:outputSet id="_OutputSet_2"/>
    </bpmn2:ioSpecification>

    <bpmn2:dataInputAssociation id="_ZqqMBJp9EeSAscaG2k8lRA">
      <bpmn2:targetRef>TaskNameInputX</bpmn2:targetRef>
      <bpmn2:assignment id="_ZqqMBZp9EeSAscaG2k8lRA">
        <bpmn2:from xsi:type="bpmn2:tFormalExpression" id="_ZqqMBpp9EeSAscaG2k8lRA">QuerySRAMP</bpmn2:from>
        <bpmn2:to xsi:type="bpmn2:tFormalExpression" id="_ZqqMB5p9EeSAscaG2k8lRA">TaskNameInputX</bpmn2:to>
      </bpmn2:assignment>
    </bpmn2:dataInputAssociation>

    <bpmn2:dataInputAssociation id="_DataInputAssociation_2">
      <bpmn2:targetRef>_DataInput_2</bpmn2:targetRef>
    </bpmn2:dataInputAssociation>
    <bpmn2:dataInputAssociation id="_DataInputAssociation_3">
      <bpmn2:targetRef>_DataInput_3</bpmn2:targetRef>
    </bpmn2:dataInputAssociation>
    <bpmn2:dataInputAssociation id="_DataInputAssociation_4">
      <bpmn2:targetRef>_DataInput_4</bpmn2:targetRef>
    </bpmn2:dataInputAssociation>
    <bpmn2:dataInputAssociation id="_DataInputAssociation_5">
      <bpmn2:targetRef>_DataInput_5</bpmn2:targetRef>
    </bpmn2:dataInputAssociation>
  </bpmn2:task>
  <bpmn2:sequenceFlow id="SequenceFlow_1" tns:priority="1" sourceRef="_1" targetRef="Task_1"/>
  <bpmn2:endEvent id="EndEvent_1" name="">
    <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
  </bpmn2:endEvent>
  <bpmn2:sequenceFlow id="SequenceFlow_2" tns:priority="1" sourceRef="Task_1" targetRef="EndEvent_1"/>
</bpmn2:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
  <bpmndi:BPMNPlane id="BPMNPlane_Process_1" bpmnElement="com.sample.bpmn">
    <bpmndi:BPMNShape id="BPMNShape_StartEvent_1" bpmnElement="_1">
      <dc:Bounds height="36.0" width="36.0" x="45.0" y="45.0"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_Task_1" bpmnElement="Task_1">
      <dc:Bounds height="50.0" width="110.0" x="155.0" y="115.0"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_EndEvent_1" bpmnElement="EndEvent_1">
      <dc:Bounds height="36.0" width="36.0" x="333.0" y="122.0"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="BPMNShape_StartEvent_1" targetElement="BPMNShape_Task_1">
      <di:waypoint xsi:type="dc:Point" x="63.0" y="81.0"/>
      <di:waypoint xsi:type="dc:Point" x="63.0" y="140.0"/>
      <di:waypoint xsi:type="dc:Point" x="155.0" y="140.0"/>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="BPMNShape_Task_1" targetElement="BPMNShape_EndEvent_1">
      <di:waypoint xsi:type="dc:Point" x="265.0" y="140.0"/>
      <di:waypoint xsi:type="dc:Point" x="295.0" y="140.0"/>
      <di:waypoint xsi:type="dc:Point" x="295.0" y="140.0"/>
      <di:waypoint xsi:type="dc:Point" x="333.0" y="140.0"/>
    </bpmndi:BPMNEdge>
  </bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
*****************************

Comment 7 Tihomir Surdilovic 2015-01-12 20:39:48 UTC
I don't think that this is a Designer problem and probably should go back to the jBPS editor.

Comment 8 Marek Baluch 2015-01-12 20:56:45 UTC
@Tiho - if this is indeed a problem in the Eclipse Designer then you said it yourself - the issue should go back to the JBDS Editor which means we must change the component to Eclipse Tooling - not marking the issue as MODIFIED!

Putting back to ASSIGNED.

@Anton - wdyt? I don't want to change the component without giving you the opportunity to express your opinion.

Thank you both!

Comment 10 Tihomir Surdilovic 2015-01-15 22:49:58 UTC
Designer can now handle bpmn2 imports which includes the drools:taskName attribute on the task node without it having the TaskName data input and its association.

In the case the imported task does have both (TaskName data input as well as the drools:taskName property) Designer will choose the non-specific TaskName data input and use that.

Fix in Designer master and 6.2.x branches.

Comment 11 Jozef Marko 2015-02-24 13:25:44 UTC
Import and build of attachment [1] was successful.

Verified on:
jboss-bpmsuite-6.1.0.ER5
jboss-eap-6.4.0.Beta


Note You need to log in before you can comment on or make changes to this bug.