AnsweredAssumed Answered

how to deploy my file?

Question asked by himfire on Apr 24, 2012
Latest reply on Jun 22, 2012 by ryananthony
hello

I want to try a code that were placed in a book . the code is shown below :

<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wf:myReviewAndApprove">

   <swimlane name="initiator" />

   <swimlane name="reviewer">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <actor>#{bpm_assignee}</actor>
      </assignment>
   </swimlane>

   <start-state name="start">
      <task name="wf:mySubmitReviewTask" swimlane="initiator" />
      <transition name="" to="review" />
   </start-state>

   <task-node name="review">
      <task name="wf:myReviewTask" swimlane="reviewer" />
      <transition name="approve" to="approve" />
      <transition name="reject" to="reject" />
   </task-node>

   <node name="approve">
      <event type="node-enter">
         <script>
            <variable name="reviewResult" access="write" />
            <expression>
               reviewResult = "approved";
            </expression>
         </script>
      </event>
      <transition to="completed" />
   </node>

   <node name="reject">
      <event type="node-enter">
         <script>
            <variable name="reviewResult" access="write" />
            <expression>
               reviewResult = "rejected";
            </expression>
         </script>
      </event>
      <transition to="completed" />
   </node>

   <task-node name="completed">
      <event type="node-enter">
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <script>
               var mail = actions.create("mail");
               mail.parameters.to =
                  initiator.properties["cm:email"];
               mail.parameters.subject =
                  "Review Task " + bpm_workflowDescription;
               mail.parameters.from
               =bpm_assignee.properties["cm:email"];
               mail.parameters.text=
                  "The article has been " + reviewResult + ".";
               mail.execute(bpm_package);
            </script>
         </action>
      </event>
      <task name="wf:myCompleteReviewTask" swimlane="initiator" />
      <transition name="" to="end" />
   </task-node>

   <end-state name="end" />

</process-definition>


I've done these steps:
1- I have placed the folder in a repository of:
       /WEB-INF/classes/alfresco/workflow
2-I have placed also the folder in the workflow definition with a type of XML.

the third step that I have tried to do it is by accessing the link below :
http://localhost:8080/alfresco/faces/jsp/admin/workflow-console.jsp
and try to deploy the file into it , but the problem is there is an error that appeared to me , and that's when I typed <help> , I tried this type:

ok> deploy <engine> <definitionClassPath>
   
        Deploy workflow definition to Alfresco server.
   
        <definitionClassPath> class path to workflow definition.
        <engine> workflow engine name (eg. activiti)

by this way :

deploy <engine> </webapps/alfresco/WEB-INF/classes/alfresco/workflow/my_review_and_approve_processdefinition.xml>

this what comes out to me :

org.alfresco.error.AlfrescoRuntimeException: 03240015 Exception in Transaction.

I'm using alfresco 4.0d . so where is my error can someone help?

Outcomes