cancel
Showing results for 
Search instead for 
Did you mean: 

Two newbie questions about designer and the underlying BPMN file.

marksinke
Champ in-the-making
Champ in-the-making
Hi there,

Since a few days, I have been working with Activiti, after a lengthy attempt to get jBPM working smoothly. I love the transparency and ease of setup of the product. Instead of fighting with numerous configuration files and with JBoss, I can focus on business logic and use lain old Tomcat.

Anyway, I now have a very simple process that just sends an e-mail. I designed it in the Designer, and it works just fine.

However, I have two questions that are probably related to my newbie status.

1. When I change the "To" property of the mail task in Designer, it no longer seems to persist in the underlying BPMN file. Edits such as adding a task do get persisted. The work around is to change the property directly in the BPMN file using Eclipse's XML editor. But that is probably not the intended use ;-).

2. When I try to get an interpolated message or recipient (i.e., if I change the property "To" in the Properties view), the runtime does not seem to pick it up. I found out by a little digging in the code that the <activiti:string /> element should be changed to an <activity:expression />. I did that in the XML file, using the XML editor, and it worked, but so far I've found no way to do that from the editor itself.

Can you help me out?

Thanks, and keep up the good work.

Regards, Mark.

PS This is my current configuration (with the edits made in the XML editor):


<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <process id="OutboundMailTest" name="OutboundMailTest" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <serviceTask id="mailtask1" name="Mail Task" activiti:type="mail">
      <extensionElements>
        <activiti:field name="to">
          <activiti:expression>${targetUser}</activiti:expression>
        </activiti:field>
        <activiti:field name="from">
          <activiti:string>test@acme.com</activiti:string>
        </activiti:field>
        <activiti:field name="subject">
          <activiti:string>Test from Activiti</activiti:string>
        </activiti:field>
        <activiti:field name="text">
          <activiti:expression>Hello there ${targetUser}!</activiti:expression>
        </activiti:field>
      </extensionElements>
    </serviceTask>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="mailtask1"></sequenceFlow>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow2" sourceRef="mailtask1" targetRef="endevent1"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_OutboundMailTest">
    <bpmndi:BPMNPlane bpmnElement="OutboundMailTest" id="BPMNPlane_OutboundMailTest">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="170.0" y="260.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="mailtask1" id="BPMNShape_mailtask1">
        <omgdc:Bounds height="55.0" width="105.0" x="280.0" y="250.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="440.0" y="260.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="205.0" y="277.0"></omgdi:waypoint>
        <omgdi:waypoint x="280.0" y="277.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="385.0" y="277.0"></omgdi:waypoint>
        <omgdi:waypoint x="440.0" y="277.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>
4 REPLIES 4

tiesebarrell
Champ in-the-making
Champ in-the-making
I can't reproduce the first issue you mention, but the second one is definitely there. It appears if you enter an expression, it doesn't get saved. Apparently it can only deal with string input in the field in the properties pane. Could you create a Jira issue for us to look into this?

marksinke
Champ in-the-making
Champ in-the-making
Thanks for the response.

I think the first issue is a sort-of user error. If you change any property in the Properties view, the diagram only shows a "modfied" star (*) when you subsequently put the focus to the diagram again. In addition, hitting Ctrl-S in the properties view does not work. If I click the diagram and hit Ctrl-S the change does get persisted.

I don't know if that is Eclipse or Activiti designer behavior. I'm happy to file a bug if it's Activiti behavior.

W.r.t. the second issue, we'll file an issue.

Regards, Mark.

marksinke
Champ in-the-making
Champ in-the-making

bluemoon
Champ in-the-making
Champ in-the-making
Can anyone please help doing the  same with Modeler. I don't see any documentation related to palette customization for web-modeler.
Getting started

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.