cancel
Showing results for 
Search instead for 
Did you mean: 

How to create simple workflow using jbpm

snowstormuser
Champ in-the-making
Champ in-the-making
Hi,
I am new to Alfresco, I have created a process in jpdl having two task. When I add the "snowstorm-model-context.xml" to "tomcat\shared\classes\alfresco\extension\"  folder the server is not started properly and  it gives following error

SEVERE: Job Solr.CoreTracker-archive threw an unhandled Exception:
org.alfresco.error.AlfrescoRuntimeException: 09080001 GetModelsDiff return status is 404
   at org.alfresco.solr.client.SOLRAPIClient.getModelsDiff(SOLRAPIClient.java:1010)
   at org.alfresco.solr.tracker.CoreTracker.trackModels(CoreTracker.java:1630)
   at org.alfresco.solr.tracker.CoreTracker.trackRepository(CoreTracker.java:1134)
   at org.alfresco.solr.tracker.CoreTracker.updateIndex(CoreTracker.java:491)
   at org.alfresco.solr.tracker.CoreTrackerJob.execute(CoreTrackerJob.java:45)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)

processdefinition.xml

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

<process-definition  xmlns="urn:jbpm.org:jpdl-3.2"  name="sswf:Sample">



   <swimlane name="initiator"></swimlane>


   <start-state name="start">
      <task swimlane="initiator" name="sswf:startProcess"></task>
      <transition to="task1"></transition>
   </start-state>


   <task-node name="task1">
      <task name="sswf:task1" swimlane="initiator"></task>
      <transition to="task2"></transition>
   </task-node>

   <task-node name="task2">
      <task name="sswf:task2" swimlane="initiator"></task>
      <transition to="end"></transition>
   </task-node>


   <end-state name="end"></end-state>


</process-definition>

snowstorm-model-context.xml

<?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="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                <value>alfresco/extension/snowstormWFModel.xml</value>
            </list>
        </property>
    </bean>

   <!– Registration of resource bundles –>
    <bean id="extension.workflowBootstrap"
          parent="workflowDeployer">
        <property name="workflowDefinitions">
         <list>
            <props>
               <prop key="engineId">jbpm</prop>
               <prop key="location">alfresco/extension/workflows/snowstorm2/processdefinition.xml</prop>
               <prop key="mimetype">text/xml</prop>
               <prop key="redeploy">true</prop>
            </props>
         </list>
      </property>
        <property name="labels">
                <list>
                <value>alfresco.extension.snowstormWFModel</value>
            </list>
        </property>
    </bean>


   
</beans>


snowstormWFModel.properties


#
#   Credit Request workflow properties
#

sswf_Sample.workflow.title=Snowstorm Workflow Sample
sswf_Sample.workflow.description=Testing WorkFlow

sswf_snowstormWorkflow.type.sswf_startProcess.title=Start Process
sswf_snowstormWorkflow.type.sswf_startProcess.description=Start Process Description

sswf_snowstormWorkflow.type.sswf_task1.title=Task 1
sswf_snowstormWorkflow.type.sswf_task1.description=Task 1 description

sswf_snowstormWorkflow.type.sswf_task2.title=Task 2
sswf_snowstormWorkflow.type.sswf_task2.description=Task 2 description




snowstormWFModel.xml

<?xml version="1.0" encoding="UTF-8"?>
<!– definition of the workflow model for document validation process –>
<model name="sswf:snowstormWorkflow" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <description> Snowstorm Workflow Model </description>
   <author>Shahid Iqbal</author>
   <version>1.0</version>

   <imports>
      <import uri="http://www.alfresco.org/model/dictionary/1.0"
         prefix="d" />
      <import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm" />
   </imports>

   <namespaces>
      <namespace uri="http://www.ensias.ma/model/cr/1.0" prefix="sswf" />
   </namespaces>

   <types>
      <!– Start Process task –>
      <type name="sswf:startProcess">
         <parent>bpm:startTask</parent>
         <properties>
            <property name="sswf:firstName">
             <title>First Name</title>
               <type>d:text</type>
            </property>

            <property name="sswf:lastName">
            <title>Last Name</title>
               <type>d:text</type>
            </property>

            <property name="sswf:adress">
            <title>Address</title>
               <type>d:text</type>
            </property>

            <property name="sswf:creditAmount">
            <title>Credit Amount</title>
               <type>d:float</type>
            </property>

            <property name="sswf:requestNumber">
            <title>Request Number</title>
               <type>d:int</type>
            </property>
         </properties>

      </type>

      <!–  Task 2 model –>
      <type name="sswf:task1">
         <parent>sswf:startProcess</parent>
         <properties>
            <property name="sswf:comments">
            <title>Comments</title>
               <type>d:text</type>
            </property>
         </properties>

      </type>

      <!– <type name="sswf:reviseRequest">
         <parent>sswf:studyCreditRequest</parent>
      </type> –>

      <type name="sswf:task2">
         <parent>sswf:creditRequest</parent>
         <properties>
            <property name="sswf:Amount">
               <type>d:float</type>
            </property>
            <property name="sswf:creditRate">
               <type>d:float</type>
            </property>
            <property name="sswf:creditPeriode">
               <type>d:text</type>
            </property>
         </properties>

      </type>


      <!– <type name="sswf:studyOffer">
         <parent>sswf:prepareOffer</parent>
      </type>

      <type name="sswf:consultOffer">
         <parent>sswf:prepareOffer</parent>
      </type> –>

   </types>

</model>

If there is any mistake please let me know.
Thanks!
6 REPLIES 6

lementree
Champ on-the-rise
Champ on-the-rise
Hi

The Error log is not enough to find the mistake.

Can you add the whole Error log.

vandana_pal
Champ in-the-making
Champ in-the-making
Hi,

Which version of alfresco you are using? . From Alfresco 4.0 Activity is by default Workflow Engine, to use JBPM you need to enable it.

Thanks,
Vandana

ggoutham
Champ in-the-making
Champ in-the-making
Hi,
I am using alfresco enterprise 4.1.2 trail as you told activiti is the default engine, and i want to deploy jbpm workflows
i want to enable the jbpm engine how can i do this,
Please help me in this regard,

Thanks in advance

ggoutham
Champ in-the-making
Champ in-the-making
I am trying to enable the jbpm by changing the repository.properties file and alfresco-global.properties files,
and restarting the server, server is not starting up, i am struggling very hard but not finding the solution
Please help me,

Thanks,
Goutham

tm
Champ in-the-making
Champ in-the-making
This is how I enabled jbpm workflows in 4.2.b©

file: alfresco-global.properties

#enable jbpm
system.workflow.engine.jbpm.definitions.visible=true
system.workflow.engine.jbpm.enabled=true

ranjitsinh_reva
Champ in-the-making
Champ in-the-making
Please check following URL for the same. You will get all required steps and details to create custom workflow using JBPM.

http://krutikjayswal-alfresco.blogspot.in/2014/04/jbpm-workflow-in-alfresco.html

Hope it will be helpful.
If it's really help you, please add your comments to it so we can update missing/required information to it.