Skip to Content
0
May 16, 2018 at 12:48 PM

How to switch the default priority of a Workflow to "1" and to then get the express-notification?

1671 Views Last edit May 17, 2018 at 06:14 AM 2 rev

Hi Folks,

I'm still struggling with the implementation of a simple workflow/task to show a pop-up to a new developer to make her/him aware of our development guidelines.

In parallel to working on the issue detailed in another question - which I marked as answered as it works now, even though we haven't been able to really pinpoint the root-cause/difference between the sandbox and the dev-system yet - I was trying to find a way to change the workflow's or task's priority from the default value of "5" to "1" to make this an express delivery to the developer's inbox. The pop-up will only serve it's purpose if the developers get the prompt directly with their first or next action, otherwise it'll go unnoticed and linger forever in their business workspace.

I tried finding a solution but the search-results I got weren't helpful or not really about the topic at hand. So, I'm wondering: is there a simple option to update the default value shown in the container?

I already found a workaround to change the priority of the work-item with function module SAP_WAPI_CHANGE_WORKITEM_PRIO which I can call from my wrapper program after successfully creating the workitem via SAP_WAPI_START_WORKFLOW. This already works and is an acceptable option.

But, there's another snag:

Even though the workitem then has priority "1" the user doesn't get a prompt for the express workitem. I have a hunch that some field assignment for the username/agent is missing in the process but I can't pinpoint where and how to correct this.

Here are some clues:

The task gets triggered via the program with prio 1 and immediately shows up as "Ready" in my business workspace inbox

My expectation had been that I'd first get a prompt to alert me of this item but I didn't get it.

When I run my wrapper program again with the option to list the latest available work item for my user via FM SAP_WAPI_WORKITEMS_BY_TASK this last one does not show up but the previous one which I had already clicked on once and which has status "Executed" at the moment.

When I go to SWI1 to look for the work-item in READY-status, I get this information, where the column for Agent shows "No current Processor":

I don't quite understand why the Agent is empty but the system still makes it show up in my inbox - so it has to know who this is intended for (I guess?).

Once I click on the item from my inbox and just close the pop-up again, it shows status "COMMITTED" and then has my name in the Agent column:

And when I then open the item yet again to click on the "Commit" button, the item shows up as COMPLETED:

So, my questions are:

  1. Should the "Agent" already be filled while the item is in status "READY"?
    Update May 17: thanks to Rob's response, I now understand why the agent is empty
  2. If the answer is "Yes" how do I get it to be filled and will that then also prompt the express-notification for the user?
    Update May 17: thanks to Rob's response, I now know where to set the priority. Unfortunately, this only works when I test this via SWDD but not when I create the work-item via my wrapper-program.
  3. If the answer is "No" how do I get the express-notification in front of the developer's face?
    Update May 17: I'm still not able to get the "Express notification pop-up" displayed even when a priority "1" workitem is waiting with status "Ready" in a user's inbox. This is actually the crucial part of this implementation. Without this notification working properly, it won't make much sense to role it out.

Please let me know which information from the workflow and task definition is also needed to find where something might be missing and I'll add some screenshots in the comments. At the moment I don't really know where to look and what to look for so would just add unneccessary clutter to this already (too?) long question.

Thanks much and Cheers

Baerbel