cancel
Showing results for 
Search instead for 
Did you mean: 

Eclipse

jagadeesh
Champ in-the-making
Champ in-the-making
<?xml version="1.0" encoding="UTF-8"?>
<definitions
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:activiti="http://activiti.org/bpmn"
targetNamespace="Examples">
<process id="myProcess" name="My First Process">
</process>
<startEvent id="thestart" />
activiti:formKey="org/activiti/examples/taskforms/request.form" />
<sequenceFlow id='flow1' sourceRef-'thestart' targetRef='ReviewPurchaseRequest' />
<userTask id="ReviewPurchaseRequest" name=Purchase request" >
activiti:formKey="org/activiti/examples/taskforms/approve.form" >
<documentation>
Review purchase Request
</documentation>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>accountancy</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<sequenceFlow id='flow2' sourceRef='RevisePurchaseRequest'
targetRef='ReviewPurchaseRequest' />
</userTask id="RevisePurchaseRequest" name=Purchase request" >
activiti:formKey="org/activiti/examples/taskforms/approve.form" >
<documentation>
Revise Purchase Request
</userTask id="ExecutepurchaseRequest" name=Purchase request" >
activiti:formKey="org/activiti/examples/taskforms/approve.form" >
<documentation>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>management</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<sequenceFlow id='flow3' sourceRef='ReviewPurchaseRequest'
targetRef='ExecutePurchaseRequest' />
</userTask id="ExecutePurchaseRequest" name=Purchase request" >
<documentation>
Execute Purchase Request
</documentation>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>management</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>


Am testing activiti inside the eclipse. Am going some where wrong in this but i dnt know what is that can any body help me in resolving this.
8 REPLIES 8

frederikherema1
Star Contributor
Star Contributor
What is the error-message shown?

Maybe a syntax-error here ( sourceRef-'thestart', should be '='):

<sequenceFlow id='flow1' sourceRef-'thestart' targetRef='ReviewPurchaseRequest' />

jagadeesh
Champ in-the-making
Champ in-the-making
Hi i have made the changes in the code see the code below,

<?xml version="1.0" encoding="UTF-8"?>
<definitions
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:activiti="http://activiti.org/bpmn"
targetNamespace="Examples">
<process id="myProcess" name="My First Process">
</process>
<startEvent id="thestart" />
activiti:formKey="org/activiti/examples/taskforms/request.form" />
<sequenceFlow id='flow1' sourceRef='thestart' targetRef='ReviewPurchaseRequest' />
<userTask id="ReviewPurchaseRequest" name=Purchase request" >
activiti:formKey="org/activiti/examples/taskforms/approve.form" >
<documentation>
Review purchase Request
</documentation>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>accountancy</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<sequenceFlow id='flow2' sourceRef='RevisePurchaseRequest'
targetRef='ReviewPurchaseRequest' />
</userTask id="RevisePurchaseRequest" name=Purchase request" >
activiti:formKey="org/activiti/examples/taskforms/approve.form" >
<documentation>
Revise Purchase Request
</userTask id="ExecutepurchaseRequest" name=Purchase request" >
activiti:formKey="org/activiti/examples/taskforms/approve.form" >
<documentation>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>management</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<sequenceFlow id='flow3' sourceRef='ReviewPurchaseRequest'
targetRef='ExecutePurchaseRequest' />
</userTask id="ExecutePurchaseRequest" name=Purchase request" >
<documentation>
Execute Purchase Request
</documentation>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>management</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
__________________________________________________________


when i run it i get the errors.


00:59:40,082 INFO  [main] Main  - javax.xml.transform.TransformerFactory=null
00:59:40,082 INFO  [main] Main  - java.endorsed.dirs=C:\Program Files\Java\jre6\lib\endorsed
00:59:40,082 INFO  [main] Main  - launchFile: E:\dev\.metadata\.plugins\org.eclipse.wst.xsl.jaxp.launching\launch\launch.xml
00:59:40,144 FATAL [main] Main  - No embedded stylesheet instruction for file: file:/C:/Product Development/activiti-5.2/workspace/activiti-engine-examples/src/test/resources/NewFile4.bpmn20.xml
org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException: No embedded stylesheet instruction for file: file:/C:/Product Development/activiti-5.2/workspace/activiti-engine-examples/src/test/resources/NewFile4.bpmn20.xml
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:225)
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:186)
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Main.java:73)
Caused by: org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException: No embedded stylesheet instruction for file: file:/C:/Product Development/activiti-5.2/workspace/activiti-engine-examples/src/test/resources/NewFile4.bpmn20.xml
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:214)
… 2 more

tombaeyens
Champ in-the-making
Champ in-the-making
I don't see any activiti in your stack trace.  Are you sure this problem is activiti related?

jagadeesh
Champ in-the-making
Champ in-the-making
what is meant by stack trace?? i dnt know abt it.?

expalin me in clear steps how to create a process and run the process..?

brsilver
Champ in-the-making
Champ in-the-making
I am not an Activiti user (yet) but I can see that your code is not even well-formed xml, much less BPMN schema-valid. It had extra tags, missing tags, missing quote signs; did the graphical editor create that code?  Yikes. Also the process nodes need to be enclosed in the process element, and everything needs to be enclosed in definitions element. I fixed it up in external xml editor, so it is now well-formed and schema-valid.  But it is still not good BPMN.  You need a gateway somewhere and a sequence flow to Revise Purchase Request; right now there is no path into that task.

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" targetNamespace="Examples" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL">
<process id="myProcess" name="My First Process">
  <startEvent id="thestart" activiti:formKey="org/activiti/examples/taskforms/request.form"/>
  <sequenceFlow id="flow1" sourceRef="thestart" targetRef="ReviewPurchaseRequest"/>
  <userTask id="ReviewPurchaseRequest" name="Review Purchase request" activiti:formKey="org/activiti/examples/taskforms/approve.form">
   <documentation>Review purchase Request</documentation>
   <potentialOwner>
    <resourceAssignmentExpression>
     <formalExpression>accountancy</formalExpression>
    </resourceAssignmentExpression>
   </potentialOwner>
  </userTask>
  <sequenceFlow id="flow3" sourceRef="ReviewPurchaseRequest" targetRef="ExecutePurchaseRequest"/>
  <userTask id="ExecutepurchaseRequest" name="Execute Purchase request" activiti:formKey="org/activiti/examples/taskforms/approve.form">
   <documentation/>
   <potentialOwner>
    <resourceAssignmentExpression>
     <formalExpression>management</formalExpression>
    </resourceAssignmentExpression>
   </potentialOwner>
  </userTask>
  <sequenceFlow id="flow2" sourceRef="RevisePurchaseRequest" targetRef="ReviewPurchaseRequest"/>
  <userTask id="RevisePurchaseRequest" name="Revise Purchase request" activiti:formKey="org/activiti/examples/taskforms/approve.form">
   <documentation>
Revise Purchase Request</documentation>
  </userTask>
  <userTask id="ExecutePurchaseRequest" name="Purchase request">
   <documentation>Execute Purchase Request</documentation>
   <potentialOwner>
    <resourceAssignmentExpression>
     <formalExpression>management</formalExpression>
    </resourceAssignmentExpression>
   </potentialOwner>
  </userTask>
</process>
</definitions>

trademak
Star Contributor
Star Contributor
Hi Bruce,

This is certainly not XML produced by the graphical editor / Activiti Designer.
That XML is ofcourse well-formed.
It looks like handwritten XML.

Best regards,

jagadeesh
Champ in-the-making
Champ in-the-making
Yes it is hand written XML .what is the next step need to be done?? Please advice.

frederikherema1
Star Contributor
Star Contributor
You should make sure your XML-syntax is valid and it should conform to the XSD schema's. If you're using eclipse, all error will be shown in the XML-editor.