cancel
Showing results for 
Search instead for 
Did you mean: 

Deploying via Process Designer and manually

kerkira67
Champ in-the-making
Champ in-the-making
Hi,

I am writing and deploying some workflow test definitions  using eclipse jBPM plugin. For some of them deployment fails with the following error message:
Exception happened while deploying

java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/alfresco/jbpm/deployprocess
   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1149)
   at org.jbpm.ui.util.ProcessDeployer.deployProcessWithServlet(Unknown Source)
   at org.jbpm.ui.util.ProcessDeployer.access$3(Unknown Source)
   at org.jbpm.ui.util.ProcessDeployer$1.run(Unknown Source)
   at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
   at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
   at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:479)
   at org.jbpm.ui.util.ProcessDeployer.showProgressMonitorDialog(Unknown Source)
   at org.jbpm.ui.util.ProcessDeployer.deploy(Unknown Source)
   at org.jbpm.ui.editor.form.deployment.DeploymentForm$1.widgetSelected(Unknown Source)
   at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
   at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
   at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
   at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
   at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
   at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
   at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
   at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
   at org.eclipse.core.launcher.Main.run(Main.java:977)
   at org.eclipse.core.launcher.Main.main(Main.java:952)

I have also tried to manually deploy the definitions. In order to do that I created the file workflow-bootstrap-context.xml in the %ALFRESCO_HOME%\jboss\server\default\conf\alfresco\extension\bootstrap directory. Here is the content of the file:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

<bean id="myworkflows.workflowBootstrap" parent="workflowDeployer">
   <property name="workflowDefinitions">
      <list>
         <props>
            <prop key="engineId">jbpm</prop>
            <prop key="location">alfresco/workflow/NegoziazioneCommesse.xml</prop>
            <prop key="mimetype">text/xml</prop>
         </props>
      </list>
   </property>
</bean>

</beans>

I put the NegoziazioneCommesse.xml file under %ALFRESCO_HOME%\jboss\server\default\conf\alfresco\workflow.
Here is the content of the file:

<?xml version="1.0" encoding="UTF-8"?>

<process-definition
  xmlns="urn:jbpm.org:jpdl-3.1"  name="NegoziazioneCommesse">
   <swimlane name="istituto">
      <assignment expression="istituto"></assignment>
   </swimlane>
   <swimlane name="dipartimento">
      <assignment expression="dipartimento"></assignment>
   </swimlane>
   <swimlane name="progettazione operativa">
      <assignment expression="progop"></assignment>
   </swimlane>
   <start-state name="Inizio">
      <transition name="" to="Stato intermedio">
      </transition>
   </start-state>
   <state name="Stato intermedio">
      <transition name="" to="Fine">
      </transition>
   </state>
   <end-state name="Fine"></end-state>
</process-definition>

When starting alfresco, I get the following error message:

14:01:50,390 ERROR [ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: Workflow deployment failed
        at org.alfresco.repo.workflow.WorkflowDeployer.deploy(WorkflowDeployer.j
ava:216)
        at org.alfresco.repo.workflow.WorkflowDeployer.onBootstrap(WorkflowDeplo
yer.java:227)
        at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLi
fecycleBean.java:54)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.m
ulticastEvent(SimpleApplicationEventMulticaster.java:45)
        at org.springframework.context.support.AbstractApplicationContext.publis
hEvent(AbstractApplicationContext.java:225)
        at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:323)


Where do I mistake?

Thank you very much

Roberto
11 REPLIES 11

davidc
Star Contributor
Star Contributor
Thanks Roberto.

I'll raise an issue to either report missing start task, or allow no start task.

chaabani
Champ in-the-making
Champ in-the-making
A have the same problem and there is my process definition.xml
<?xml version="1.0" encoding="UTF-8"?>

<process-definition xmlns="urn:jbpm.org:jpdl-3.2"
   name="wfcm:credit">
   <swimlane name="initiator">
   </swimlane>

   <swimlane name="ApprovalMember">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <pooledactors>
            #{people.getGroup('GROUP_ApprovalMember')}
         </pooledactors>
      </assignment>
   </swimlane>

   <swimlane name="LegalMember">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <pooledactors>#{people.getGroup('GROUP_LegalMember')}</pooledactors>
      </assignment>
   </swimlane>

   <swimlane name="FinancialMember">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <pooledactors>#{people.getGroup('GROUP_FinancialMember')}</pooledactors>
      </assignment>
   </swimlane>

   <swimlane name="AdministrativeFinancialManagement">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <pooledactors>#{people.getGroup('GROUP_AdministrativeFinancialManagement')}</pooledactors>
      </assignment>
   </swimlane>



   <start-state name="Start">
      <task name="wfcm:start" swimlane="initiator">
      </task>
      <transition to="CreditForm" name="trCreditForm"></transition>
   </start-state>


   <task-node name="CreditForm">
      <task name="wfcm:creditForm" swimlane="initiator">
      </task>
      <event type="node-enter">
         <action name="CreditFormActionHandler"
            class="com.koossery.workflow.credit.handler.creditform.CreditFormActionHandler">
         </action>
      </event>
      <transition to="Simulation" name="trSimulation"></transition>
   </task-node>

   <task-node name="ApprovalCommitte">
      <task name="wfcm:approvalCommittee" swimlane="ApprovalMember">
         <controller>
            <variable name="wfcm_statusDocument" access="read"
               mapped-name="wfcm_statusDocument">
            </variable>
            <variable name="wfcm_piecesNumber" access="read"
               mapped-name="wfcm_piecesNumber">
            </variable>
         </controller>
      </task>
      <event type="node-enter">
         <action name="ApprovalCommitteActionHandler"
            class="com.koossery.workflow.credit.handler.approvalcommitte.ApprovalCommitteActionHandler">
         </action>
      </event>
      <transition to="forkApprovalCommitte" name="trFork"></transition>
      <transition to="End" name="trEnd2"></transition>
   </task-node>

   <fork name="forkApprovalCommitte">
      <transition to="LegalService" name="trLegalService">
      </transition>
      <transition to="FinancialService" name="trFinancialService">
      </transition>
   </fork>

   <task-node name="LegalService">
      <task name="wfcmSmiley TonguerepareContrat" swimlane="LegalMember">
      </task>

      <event type="node-enter">
         <action name="LegalServiceActionHandler"
            class="com.koossery.workflow.credit.handler.legalservice.LegalServiceActionHandler">
         </action>
      </event>
      <transition to="joinApprovalCommitte" name="trJoinLegalService"></transition>
   </task-node>

   <task-node name="FinancialService">
      <task name="wfcmSmiley TonguerepareOutlay" swimlane="FinancialMember">
      </task>
      <event type="node-enter">
         <action name="FinancialServiceActionHandler"
            class="com.koossery.workflow.credit.handler.financialservice.FinancialServiceActionHandler">
         </action>
      </event>
      <transition to="joinApprovalCommitte" name="trJoinFinancialService">
      </transition>
   </task-node>

   <join name="joinApprovalCommitte">
      <transition to="CreditContract" name="trCreditContrat">
      </transition>
   </join>

   <task-node name="CreditContract">
      <task name="wfcm:creditContract" swimlane="AdministrativeFinancialManagement">
      </task>
      <event type="node-enter">
         <action name="CreditContratActionHandler"
            class="com.koossery.workflow.credit.handler.creditcontrat.CreditContratActionHandler">
         </action>
      </event>
      <transition to="Archiving" name="trArchiving"></transition>
   </task-node>

   <task-node name="Payment">
      <task name="wfcmSmiley Tongueayment" swimlane="AdministrativeFinancialManagement">
      </task>
      <event type="node-enter">
         <action name="PaymentActionHandler"
            class="com.koossery.workflow.credit.handler.payment.PaymentActionHandler">
         </action>
      </event>
      <transition to="End" name="trEnd3"></transition>
   </task-node>

   <task-node name="ResultSimulation">
      <task name="wfcm:resultSimulation" swimlane="initiator">
         <controller>
            <variable name="wfcm_statusDocument" access="read,write"
               mapped-name="wfcm_statusDocument">
            </variable>
            <variable name="wfcm_piecesNumber" access="read,write"
               mapped-name="wfcm_piecesNumber">
            </variable>
         </controller>
      </task>
      <event type="node-enter">
         <action name="ResultSimulationActionHandler"
            class="com.koossery.workflow.credit.handler.resultsimulation.ResultSimulationActionHandler">
         </action>
      </event>
      <event type="node-leave">
         <action name="ResultSimulationActionHandler"
            class="com.koossery.workflow.credit.handler.resultsimulation.ResultSimulationActionHandler">
         </action>
      </event>

      <transition to="ApprovalCommitte" name="trApprovalCommitte">
      </transition>
      <transition to="CreditForm" name="trCreditForm2"></transition>
      <transition to="End" name="trEnd">

      </transition>
   </task-node>

   <node name="Simulation">

      <event type="node-enter">
         <action name="SimulationActionHandler"
            class="com.koossery.workflow.credit.handler.simulation.SimulationActionHandler">
         </action>
      </event>
      <transition to="ResultSimulation" name="trResultSimulation2"></transition>
   </node>

   <task-node name="Archiving">
      <task name="wfcm:archiving" swimlane="AdministrativeFinancialManagement">
      </task>
      <event type="node-enter">
         <action name="ArchivingActionHandler"
            class="com.koossery.workflow.credit.handler.archiving.ArchivingActionHandler">
         </action>
      </event>
      <transition to="Payment" name="trPayment"></transition>
   </task-node>
   <end-state name="End">
      <event type="node-enter">
         <action name="EndActionHandler"
            class="com.koossery.workflow.credit.handler.end.EndActionHandler">
         </action>
      </event>
   </end-state>

</process-definition>



when I test connection from jbpm-jpdl designer the connection is fine
bit when I deploy the Workflow I have this error






java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/alfresco/jbpm/deployprocess
   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1612)
   at org.jbpm.gd.jpdl.util.ProcessDeployer.deployProcessWithServlet(Unknown Source)
   at org.jbpm.gd.jpdl.util.ProcessDeployer.access$3(Unknown Source)
   at org.jbpm.gd.jpdl.util.ProcessDeployer$1.run(Unknown Source)
   at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
   at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
   at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
   at org.jbpm.gd.jpdl.util.ProcessDeployer.showProgressMonitorDialog(Unknown Source)
   at org.jbpm.gd.jpdl.util.ProcessDeployer.deploy(Unknown Source)
   at org.jbpm.gd.jpdl.deployment.DeploymentForm$1.widgetSelected(Unknown Source)
   at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
   at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
   at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
   at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
   at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
   at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
   at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
   at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
   at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
   at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:601)
   at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
   at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
   at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
   at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
please could you help me !!