cancel
Showing results for 
Search instead for 
Did you mean: 

Providing inputs to workflow

dynamolalit
Champ on-the-rise
Champ on-the-rise
Hi,

I am using Alfresco 3.0+JBoss 4.2.2.I have developed a sample workflow using jpdl designer in eclipse as "

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

<process-definition xmlns="urn:jbpm.org:jpdl-3.2"
   name="Orde-WF2.8">
   <swimlane name="buyer">
      <assignment actor-id="customer"></assignment>
   </swimlane>
   <swimlane name="deliverDepartment">
      <assignment actor-id="deliver-man"></assignment>
   </swimlane>
   <start-state name="start">
      <task name="wf:submitReviewTask" swimlane="buyer">         
      </task>
      <transition name="trPlcaeOrder" to="PlaceOrder">
      </transition>
   </start-state>
   <task-node name="PlaceOrder">
      <task name="placeOrderTask" swimlane="buyer">

      </task>
      <transition name="checkAvailability" to="CheckAvailability"></transition>
   </task-node>
   <decision name="CheckAvailability">
      <handler class="com.sample.action.VerifyOrder"></handler>
      <transition name="trDeliver" to="Deliver"></transition>
      <transition name="trGetFromStock" to="GetFromStock"></transition>
   </decision>
   <state name="GetFromStock">
      <event type="node-enter">
         <action class="com.sample.action.GetFromStockActionHandler"
            name="recharge"></action>
      </event>
      <transition name="checkAvailability" to="CheckAvailability"></transition>
   </state>
   <task-node name="Deliver">
      <transition name="trEnd" to="end"></transition>
   </task-node>
   <end-state name="end"></end-state>
</process-definition>

Now when this workflow is invoked,user should be able to submit some input values say 100.How can i achieve this.Is there anything related to command prompt or workflow console or Web Forms or anything else which needs to be developed to supply inputs to workflow?In brief,how can i supply inputs to a workflow deployed in Alfresco?

Happy to see your suggestions.

Thank You,
Regards,
Lalit
1 REPLY 1

jpotts
World-Class Innovator
World-Class Innovator
Lalit,

You have to tell Alfresco about the metadata you want to capture. You do this by creating a workflow model which is exactly like creating a content model. Task nodes are presented to the user through the Alfresco web client. You configure the metadata that is shown in that interface by defining a type that has the same name as your task node name. The type's properties defines the metadata you're going to persist with the workflow. Just like exposing a custom content model to the UI, the next step is to configure the web client by defining the properties that should be shown when that task node is displayed. That's done by editing web-client-config-custom.xml.

I know it sounds confusing, and it is several steps, but it isn't as bad as it sounds.

Here's a tutorial that lays it all out: http://ecmarchitect.com/archives/2007/11/19/785 or take a look at Chapter 7 of the Alfresco Developer Guide.

Jeff