Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

This is the 4th part of this blog .

SAP CRM/SolMan ChaRM:  Multiple Target Agents via SAP Workflow - Minimal ABAP Development

http://scn.sap.com/community/it-management/alm/solution-manager/blog/2014/01/21/sap-crmsolman-charm-...

Second part can be accessed:

http://scn.sap.com/community/it-management/alm/solution-manager/blog/2014/01/22/sap-crmsolman-charm-...

Third part can be accessed:

http://scn.sap.com/community/it-management/alm/solution-manager/blog/2014/01/23/sap-crmsolman-charm-...

In the link of part 3 appears the word last at the .  That is because with parts 1 to 3 this we consider you have all the elements we researched to do our work and begin working with WF in ChaRM.     This part 4 will show how to test the WF as well as running the full scenario using the Web UI plus getting additional details behind the WF scene like how to trace and troubleshoot.

Let's test the WF itself.

We select one of our RfCs.

Based on table CRMD_ORDERADM_H we get the GUID #.

Back to SWDD, we click on the test button and provide the mandatory import parameter the GUID #.

You get a confirmation that the task is in process.

And from there we can access all the logs.  Click the Workflow Log button and there are lots of screens there to see, but we will just point a couple of them.  The one below gives you access to the Agents that are to process the task to review the RfC.  Click on that button and then on Agents.

As you can see, based on the manager's requirements, even though Requester (Delegate Number 1) is a Delegate, that user is removed from the list of agents to get the Task.  Just the OU's Team  Lead and the other Delegates get notified.

Back to the main log screen, selecting the button you get access to see the individual steps of the WF and e.g. access the container contents of that particular step.  That helps as you can find out you are not passing the correct parameters and need to fix the binding in the WF, etc.

Finally, you can see if the overall WF is stopping at the task it is supposed to be stopped waiting for an asynchronous task to be performed.

etc.   You can continue or quit SWDD.

Before we create a fresh scenario, we need to enable WF event tracing.  Go to transaction SWELS and make sure event tracing is on.

Now, let's create a fresh scenario and for that we will logon as The Boss.  We will create a RfC and place it in phase Validation.  The Boss and all Delegates should be notified in their WebUI's Worklist.   Once any of those Agents moves the RfC to the next phase To Be Approved, the Task in all the Worklists will disappear.

You can access the Worklist and the entry was added there.

Before we access the document to Validate it, let's see what happens behind the scenes.

Launch transaction SWEL and execute it.  The event that starts the WF was launched.

You can double-click on that entry and it will take you to the same Workflow log we access before.

But, what does really control that the WF Task is waiting for an action?  Transaction SWE3 has the answer.   There is an entry automatically created there by the WF Task with the terminating event REQUESTTOBEAPPROVEDNEW.  If you select that line and double-click on Object Data you will get access to a list of different GUIDs of RfCs that are in phase Validation (ready to be processed).

You can confirm with table CRMD_ORDERADM_H that the GUID corresponds to the RfC.

Check on the screen above that there is a receiver key 20137, which is reflected in the WF log you can access through SWEL.

Those key values are important as when the event to terminate the task is triggered, it will find the exact entry in SWE3 (Table SWFDVEVINS) to remove it from there, leaving the other entries there untouched.

Let's go back to the Web UI and click on our RfC entry in the worklist to review it and promote it to the next phase.   The description is the one you entered when created the Task.  Below WF adds the link to the RfC.  You can click on it to open it.

We validate the RfC and promote it to the next phase.

A couple of things:  The RfC gets removed from the Worklist and the WF log diagram shows that the WF for this RfC is completed.

SWEL shows that the terminating event was triggered.

Double-clicking on that entry in the log we click the graphical button and see that the WF is completed.

You can confirm that the document does not exist any longer in SWE3.

I guess that is sufficient for this blog.

Let's just add that there is a table SWWWIHEAD that keeps information that can help troubleshooting.  The list was sorted descending and shows in the red square the different steps the RfC has gone through.  Some completed, some ready.    Accessing that table you can find if, e.g. a RfC phase is on error status.

Some bibliography for you.

1. The 2 workflow pack:

  • Practical WF forSAP 2nd Ed.  All the book.  It covers almost anything in WF.  Excellent.
  • ABAP Development for SAP Business  Workflow    A couple of tips we got to understand the ABAP programming instructions.  Good complement for WF developers

http://www.sap-press.com/products/The-Workflow-2%252dpack.html

2. Hoping this does not create a conflict.  With all the respect, the guys from http://www.****************.    Good examples to learn WF.

3. Mr Nathan Williams and his wonderful book:  IT Service Management in SAP Solution Manager.   I still do not understand how one guy can do so much and to top it off, he is a musician.  Can you believe that?

http://www.sap-press.com/products/IT-Service-Management-in-SAP-Solution-Manager.html

4.  BRFPlus - Business Rule management for ABAP Applications.

http://www.sap-press.com/products/BRFplus-%E2%80%94-Business-Rule-Management-for-ABAP-Applications.h...

5.  BRFPlus.  There is this 1-2 days training in BRFplus you can get for free.  Excellent material, well organized.   There are 3 sessions in particular that tell you how it works.

http://scn.sap.com/docs/DOC-8824?rid=/webcontent/uuid/90754865-f283-2b10-6d9f-b10f3c28c3a0

And the bonus ... a BRFPlus example.

http://scn.sap.com/community/it-management/alm/solution-manager/blog/2014/01/24/basic-brfplus-exampl...

Enjoy,

Juan-Carlos

2 Comments
Labels in this area