<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: unit testing and service task expressions in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/unit-testing-and-service-task-expressions/m-p/89014#M60468</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;activiti.cfg.xml is not used in activiti-explorer. Rather, use a applicationContext.xml to wire in any service you want to use, instead of the cfg.xml-file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;/activiti-webapp-explorer2/src/main/webapp/WEB-INF/applicationContext.xml&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Oct 2012 12:25:16 GMT</pubDate>
    <dc:creator>frederikherema1</dc:creator>
    <dc:date>2012-10-19T12:25:16Z</dc:date>
    <item>
      <title>unit testing and service task expressions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unit-testing-and-service-task-expressions/m-p/89011#M60465</link>
      <description>Activiti: 5.9I am having trouble with unit testing an activiti process that contains an expression.Consider the following task:&amp;lt;serviceTask id="getAlfrescoGuid" name="Get Alfresco Guid" activiti:expression="#{alfrescoGuid.execute(execution)}"&amp;gt;&amp;lt;/serviceTask&amp;gt;I have the bean defined in my s</description>
      <pubDate>Sat, 11 Aug 2012 14:39:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unit-testing-and-service-task-expressions/m-p/89011#M60465</guid>
      <dc:creator>robmckinnon</dc:creator>
      <dc:date>2012-08-11T14:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: unit testing and service task expressions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unit-testing-and-service-task-expressions/m-p/89012#M60466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If any one is interested I figured this one out.&amp;nbsp; In your unit test you will need to include the following in the processEngineConfiguration:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;property name="beans"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;map&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;entry key="alfrescoGuid" value-ref="alfrescoGuid" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/map&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/property&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found the answer in the user guide.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Aug 2012 22:26:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unit-testing-and-service-task-expressions/m-p/89012#M60466</guid>
      <dc:creator>robmckinnon</dc:creator>
      <dc:date>2012-08-12T22:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: unit testing and service task expressions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unit-testing-and-service-task-expressions/m-p/89013#M60467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I did the same thing but its not working for me. Can you help me out. Here are the details&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. I am using the demo setup (ant demo.start)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. I created a .bpmn.xml file which is as follows. This test process is pretty simple. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a. process starts (Start)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; b. Customer enters name and salary and submit (User task)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c. An exclusive gateway decides if salary &amp;gt; 2000 or salary &amp;lt;=2000 (exclusive gateway)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; d. if Salary &amp;gt; 2000, then it is Platinum member, execute Java Service Task (service task)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; e. else it is Gold Member&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; .bpmn.xml&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;BR /&gt;&amp;lt;definitions xmlns="&lt;A href="http://www.omg.org/spec/BPMN/20100524/MODEL" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/BPMN/20100524/MODEL&lt;/A&gt;" xmlns:xsi="&lt;A href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/A&gt;" xmlns:activiti="&lt;A href="http://activiti.org/bpmn" rel="nofollow noopener noreferrer"&gt;http://activiti.org/bpmn&lt;/A&gt;" xmlns:bpmndi="&lt;A href="http://www.omg.org/spec/BPMN/20100524/DI" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/BPMN/20100524/DI&lt;/A&gt;" xmlns:smileysurprised:mgdc="&lt;A href="http://www.omg.org/spec/DD/20100524/DC" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/DD/20100524/DC&lt;/A&gt;" xmlns:smileysurprised:mgdi="&lt;A href="http://www.omg.org/spec/DD/20100524/DI" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/DD/20100524/DI&lt;/A&gt;" typeLanguage="&lt;A href="http://www.w3.org/2001/XMLSchema" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/2001/XMLSchema&lt;/A&gt;" expressionLanguage="&lt;A href="http://www.w3.org/1999/XPath" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/1999/XPath&lt;/A&gt;" targetNamespace="&lt;A href="http://www.activiti.org/test" rel="nofollow noopener noreferrer"&gt;http://www.activiti.org/test&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;process id="my_test_process" name="MyTestProcess"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;startEvent id="startevent1" name="Start" activiti:initiator="kermit"&amp;gt;&amp;lt;/startEvent&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"&amp;gt;&amp;lt;/exclusiveGateway&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;userTask id="details" name="Enter Details" activiti:assignee="kermit" activiti:candidateUsers="fozzie"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;documentation&amp;gt;This is a Test Form Documentation 2&amp;lt;/documentation&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;extensionElements&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:formProperty id="user_name" name="Name" type="string"&amp;gt;&amp;lt;/activiti:formProperty&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:formProperty id="salary" name="salary" type="long"&amp;gt;&amp;lt;/activiti:formProperty&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/extensionElements&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/userTask&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;userTask id="usertask4" name="Gold Member" activiti:assignee="kermit" activiti:candidateUsers="fozzie"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;documentation&amp;gt;This is documentation for Gold Member&amp;lt;/documentation&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/userTask&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway"&amp;gt;&amp;lt;/exclusiveGateway&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;endEvent id="endevent1" name="End"&amp;gt;&amp;lt;/endEvent&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;serviceTask id="servicetask1" name="Platinum Member" activiti:expression="#{platinum.doSomething()}"&amp;gt;&amp;lt;/serviceTask&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow2" name="" sourceRef="details" targetRef="exclusivegateway1"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow3" name="salary_flow_a" sourceRef="exclusivegateway1" targetRef="servicetask1"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;conditionExpression xsi:type="tFormalExpression"&amp;gt;&amp;lt;![CDATA[${salary &amp;gt; 2000}]]&amp;gt;&amp;lt;/conditionExpression&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow4" name="" sourceRef="startevent1" targetRef="details"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow5" name="salary_flow_b" sourceRef="exclusivegateway1" targetRef="usertask4"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;conditionExpression xsi:type="tFormalExpression"&amp;gt;&amp;lt;![CDATA[${salary &amp;lt;= 2000}]]&amp;gt;&amp;lt;/conditionExpression&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow6" name="" sourceRef="usertask4" targetRef="exclusivegateway2"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow7" name="" sourceRef="servicetask1" targetRef="exclusivegateway2"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow8" name="" sourceRef="exclusivegateway2" targetRef="endevent1"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/process&amp;gt;&lt;BR /&gt; &lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;3. activiti.cfg.xml&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;beans xmlns="&lt;A href="http://www.springframework.org/schema/beans" rel="nofollow noopener noreferrer"&gt;http://www.springframework.org/schema/beans&lt;/A&gt;" &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:xsi="&lt;A href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/A&gt;"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xsi:schemaLocation="&lt;A href="http://www.springframework.org/schema/beans" rel="nofollow noopener noreferrer"&gt;http://www.springframework.org/schema/beans&lt;/A&gt;&amp;nbsp;&amp;nbsp; &lt;A href="http://www.springframework.org/schema/beans/spring-beans.xsd" rel="nofollow noopener noreferrer"&gt;http://www.springframework.org/schema/beans/spring-beans.xsd&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;nbsp; [color=#FF0040]&amp;lt;bean id="platinum" class="com.osr.test.PlatinumService" /&amp;gt;[/color]&lt;BR /&gt;&amp;nbsp; &amp;lt;bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!– Database configurations&amp;nbsp; –&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="databaseSchemaUpdate" value="true" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="jdbcUrl" value="jdbc:h2:tcp://localhost/activiti" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="jdbcDriver" value="org.h2.Driver" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="jdbcUsername" value="sa" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="jdbcPassword" value="" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="jobExecutorActivate" value="true" /&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/bean&amp;gt;&lt;BR /&gt;&amp;nbsp; [color=#FF0040]&amp;lt;property name="beans"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;map&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;entry key="platinum" value-ref="platinum" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/map&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/property&amp;gt;[/color]&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;&amp;lt;/beans&amp;gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;4. MyFirstProcessDiagram.jar is the JAR file containing a classfile of&amp;nbsp; osr.test.PlatinumService.java.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now here is how i deploy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; - Deployed the .bar file using activiti explorer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; - Placed the JAR file in activiti-5.9\apps\apache-tomcat-6.0.32\webapps\activiti-rest\WEB-INF\lib&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; - start Tomcat using ant demo.start&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When i start my process from within the activiti-explorer (Process &amp;gt; start) i see a form where user enters the Name and Salary and Submit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Problem : as soon as i submit i get an exception&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Exception&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;Caused by: org.activiti.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'platinum'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.juel.AstIdentifier.eval(AstIdentifier.java:83)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.juel.AstMethod.invoke(AstMethod.java:79)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.juel.AstMethod.eval(AstMethod.java:75)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.juel.AstEval.eval(AstEval.java:50)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;What am i missing ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 05:24:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unit-testing-and-service-task-expressions/m-p/89013#M60467</guid>
      <dc:creator>shukla_raghav</dc:creator>
      <dc:date>2012-10-19T05:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: unit testing and service task expressions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unit-testing-and-service-task-expressions/m-p/89014#M60468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;activiti.cfg.xml is not used in activiti-explorer. Rather, use a applicationContext.xml to wire in any service you want to use, instead of the cfg.xml-file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;/activiti-webapp-explorer2/src/main/webapp/WEB-INF/applicationContext.xml&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 12:25:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unit-testing-and-service-task-expressions/m-p/89014#M60468</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-10-19T12:25:16Z</dc:date>
    </item>
  </channel>
</rss>

