Webrun node example for approve action

 5 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
ThomasT
Advanced Member
Posts: 27
Advanced Member
    Does anyone have an example of how to build the WebRun node to process an 'approve' action? 

    I am unsure how to code the 'Web Program' node. Is it bpm/inbasket? or inbasket/inbasket.js???
    PKS
    Advanced Member
    Posts: 23
    Advanced Member
      it is bpm/inbasket
      ThomasT
      Advanced Member
      Posts: 27
      Advanced Member
        After much work on this, I think it's been figured out.

        Putting bpm/inbasket or bpm/inbasket.do or bpm/inbasket? in the web program field, and the rest of the URL call in the post string does not and will not work. Yes I have tried it. It does not work.

        What did work for me was to put the entire URL of the actual call to approve the workunit, into the web program field. And I left the post string blank. I have verified this works and there was no error messages or entries in the workunit log. There were success entries in the log, that the workunit had been approved!

        Many thanks to David Williams for his assistance with this issue. He is an invaluable source of knowledge!

        Mark Ivankovich
        Basic Member
        Posts: 16
        Basic Member
          Can you give an example of the syntax in the call?
          ThomasT
          Advanced Member
          Posts: 27
          Advanced Member
            Here's what I did:
            1) Used Fiddler to catch the URL syntax when I approved or rejected something in the inbasket. Fiddler will then hold the URL you performed. http:///bpm/inbasket?
            2) Then within the webrun node, I put in the Web Program field, the bpm/inbasket?.... plus everything to the right of it from the URL you caught in 1) from above (). You don't need put anything in the Post String field regardless of what the documentation says for this example. (I tried to do just this, and again, it did not work for me after many tries). If you want to you can use the Success String field but I didn't.

            Depending on your webrun node, you can insert variables in the part such as PROCESSID or the WORKUNIT field values.

            When you test them, make sure there are no .err files from the flow caused by the webrun. 
            Tom Hendrix
            New Member
            Posts: 1
            New Member
              Thomas,

              I am trying to add an Approve & Reject Action to an eMail.  I have the link formatted to do this, I am just missing 1 piece of information.  I believe I need to send the Activity ID for the User Action I am trying to Approve.  Is there a way to find the Activity ID for the User Action?  I believe this is the only part of the command I can't resolve.

              Thanks