on 03-22-2013 12:08 PM
Hi all,
I am trying to create a workflow application and i would like to use WF-DCN without payload.
Workflow application is a server initiated workflow application, which will send a notification to manager as soon as a employee requests for travel request to be approved. Once manager receives notification he can update the request i.e. approve or reject.
As per the documentation i could see that the MBO needs to be placed in online cache policy. I have done the same and added a load parameter as mentioned in the documentation. PFB the definition of MBO.
SELECT trvl_Id,
trvl_Date,
trvl_Loc,
est_Cost,
purpose,
trvl_Status,
st_Cmmnt FROM sampledb.dba.TravelRequest1 where trvl_Id=:trvl_idLP
This MBO has 3 operations i.e UPDATE, DELETE, CREATE.
Definition of UPDATE operation is as mentioned below.
UPDATE sampledb.dba.TravelRequest1
SET
trvl_Date=:trvl_Date,
trvl_Loc=:trvl_Loc,
est_Cost=:est_Cost,
purpose=:purpose,
trvl_Status=:trvl_Status,
st_Cmmnt=:st_Cmmnt
WHERE (trvl_Id = :trvl_Id)
commit
PFB the URL which i am using to send a WF-DCN (without payload)
http://localhost:port/dcn/DCNServlet?
cmd=wf&security=admin&username=supAdmin&password=s3pAdmin&domain=default&package=Sample_Workflow1&dcn_request={"id":"abca","op":":update","to":"pavan","subject":"Vacation request (4) is ready for approval","from":"user321","body":"This is a message just used to do a test","received":"2013-04-20T10:07:45+05:00","read":false,"priority":true}
Once i paste the link in browser, i get a success message as mentioned below
{"id":"abca","success":true,"statusMessage":"","result":[]}
Problem is i dont get a notification on the device. In SCC, Transform Items will be 1 and Transform Queue status will be Waiting to retry.
Please let me know how to go about it..
Which is the document you are following?
Keep the operation as upsert instead of update.
Follow this document.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Midhun,
Thanks for the reply. Now i am getting error as below.
PFB the link..
http://scn.sap.com/thread/3239462
Please help me with the problem
Thanks in advance.
Regards,
Pavan
hi Midhun,
PFB the error log in SCC
2013-03-23 20:01:21.969 WARN Other MessageChannel Thread-578 [Sample_Workflow1.server.Sample_Workflow1DB]{"_op":"C","level":5,"code":500,"eisCode":"","message":"java.lang.Exception:namedQuery: findByPrimaryKeyunknown","component":"TravelRequest1","entityKey":null,"operation":"search","requestId":"237297e2963e4f6090243f1521ad7be1","timestamp":"2013-03-23 14:31:21.969","messageId":0,"_rc":0}
i guess findbyPrimaryKey object query is unknown. I am not able to create object query as the MBO is in online cache policy. PFB the link which says we cannot create object queries if MBO is in online cache policy.
In my project i have selected one parameter as primary key and it has created findByParameter object query but not findByPrimary key..
Please help.
Regards,
Pavan
Is the findbyprimary key query you used in the Server Initiated starting point is working?
The error tells are the query is unknown that means the query that you associated with the server initiated point is not working.
Keep a button in somewhere in the app screen and call this findbyprimary key query is test whether the query returns any values. If it is not working we can confirm that the issue is with the query.
Recreate the query and test again. And associate it with the server initiated starting point.
Thanks a lot Midhun for the help and suggestion.
Problem was that i had created MBO and it was in default cache policy. Now created Server initiated workflow and then i moved MBO to Online cache policy. Hence workflow was still refering to findByPrimaryKey object query. Since i moved MBO from default to Online cache group, findByPrimaryKey was removed..
I have replaced to field with supAdmin which is the username of SUP server.. even then im getting the issue. It is just increasing the number of messages to be sent to the device and the transform queue status is Waiting for retry.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.