Wednesday, December 24, 2014

Inline Approval Function

This is helpful you to work with InfoPath form approval for Approval task using Flexi task or request task actions.

1.       Create Web Service to get “SharePointTaskId

·         Manage data connection à Addà Create a new connection à Receive data àSoap Web service à enter following link
 



·         Select “GetRunningWorkflowTasksForCurrentUserà Next à Finish

2.       Create a web service to get Task ID and Outcome
·         Manage data connection à Addà Create a new connection à Receive data àSoap Web service à enter following link
·         Select “ProcessTaskResponse3à Next



With Flexi Task Action :
·         Select “ProcessFlexiTaskResponse2” 



·         Put Task list name : eg -->“Personnel Requisition Workflow Tasks”

You have to configure Task Outcome values in InfoPath Form as “Approved” or “Rejected”

3.       Sumbit button function

·         Add rule for Disable Submit button





·         Add Sumbit rule  à
·         Set field value for outcome : Set outcome form ProcessTaskResponse3/ProcessFlexiTaskResponse2 Web service.





·         Set Task ID : Set spTaskId form ProcessTaskResponse3/ProcessFlexiTaskResponse2 Web service.




·         Set SharePointTaskId form “GetRunningWorkflowTasksForCurrentUser” Web service.





·         Set Query Data


·         Set HasTask false :



·         Send Update



·         Finally Close the form action .

4.       Set Form Load function
·         Query by task  -Set fileUrl à to form variable





·         Set Query connection :


5.       Set Set hask task = true
·         Check condition FileUrl is not blank and  TaskType = "Approval"(for ProcessTaskResponse3) or TaskType = "MultiOutcome" (for ProcessFlexiTaskResponse2)

·         Set variables for task type






·         Set Has task variable = true()





6.       Error
·         If you are getting this kind of error check the web service links and verify




Workflow end configuration for Flexi Task.

<ProcessFlexiTaskResponse2 xmlns="http://nintex.com">
      <comments>string</comments>
      <outcome>string</outcome>
      <spTaskId>int</spTaskId>
      <taskListName>string</taskListName>
    </ProcessFlexiTaskResponse2>




Workflow end configuration for Request Approval Task. Please notify that you have to put below outcomes only.

<ProcessTaskResponse2 xmlns="http://nintex.com">
      <comments>string</comments>
      <outcome>None or Approved or Rejected or Pending or Cancelled or NotRequired or Continue or Delegated or Custom or OverrideApproved or OverrideRejected or OverrideContinue</outcome>
      <spTaskId>int</spTaskId>
      <taskListName>string</taskListName>
    </ProcessTaskResponse2>


No comments:

Post a Comment