on 05-16-2018 1:48 PM
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:
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
After some more trial and error and thanks to the clarifying information provided by rob.dielemans and mike.pokraka I now have a solution to my question.
Most of the logic happens in my wrapper-program which does the following:
Bottom line: this turned out to be more involved than I had first thought but it also gave me the opportunity to dabble a bit with SAP workflow and a bit more with ABAP-OO logic. It may not be the most straightforward solution to the requirement I wanted to tackle but as long as it works I can live with that!
Thanks again and cheers
Baerbel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Upon further testing, I hit another snag - and it may just be due to by ignorance about most things Workflow .....
I triggered 3 workitems - 1 for me and 1 each for two colleagues - via my wrapper program which got created as expected:
But, when I then go into my SBWP-inbox I find all three of them there - my expectation had been that I'd just see mine and my colleagues each see also just their own but they also see all three:
When I check the logs for them, I see that the container has the correct user-ID in the ACTUAL_AGENT field for each of them.
So, why are we all seeing all three work items and not just the expected one?
If I just create one work item for one of my colleagues, I also see it in my inbox.
Is this expected behaviour and if yes, can I avoid it and how? Each work item should always just end up in one inbox. At the moment, I don't know if I have to look in SWDD or in my wrapper program for the reason of why it happens the way it does.
Does anybody have some clues of where to look and how to fix this?
Thanks & Cheers
Baerbel
We've veered far off the topic of this question, but how are you assigning the agents?
You should start the WF with an ID in a container element, which you then enter as the agent in the step definition. The ACTUAL_AGENT only gets filled on task completion and will contain the ID who actually executed it.
Hi Mike,
regarding off-topic: I actually was debating with myself whether or not to create yet another question for this but then went with using this already existing one as it seemed "related enoough". If you think it's better to have this latest issue I'm running into as a separate question I can create a new thread and add some more screenshots and context to it.
Update: some more trial and error makes it look as if this is related to the task being defined as a general task (the workitems are also visible in colleagues' inboxes who I don't trigger it for) and that the expression to determine the actual user doesn't do what I think it should do. So, if this is "worthy" of its own question, I'll create one - I'm still hoping that there's an easy solution for this, though.
Hi Bärbel,
While it's related within your application, I think as topics go, priority and receiver are pretty different 🙂
WF is not usually as difficult as you're encountering, really 🙂
Post the piece of code and how you route the item and we can try to help.
Thanks for your patience, Mike!
I created another thread with lots of screenshots:
How to have a general task workitem only show up in one specific user's inbox?
Hi Bärbel,
1. agent is empty because it has not yet been executed by an agent. Through SWIA, or substitution the actual agent of a workitem can be different than the one assigned initially.
3. maybe some setting in the system.What happens when you create an express message (system-->short message) to a user. If this does not create the popup then it is some office setting.
You can change the prio of any step in the workflow in the workflow developer, just double click the workflow step, then go to the second last tab - Miscellaneous and change the prio to 1.
Kind regards and have fun in your workflow endeavours!
Rob Dielemans
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Rob!
Ah, okay, now I understand why the agent is empty at first.
When I create an express message directly and send it to myself the notification pop-up gets displayed as expected.
I changed the step-priority for the task to 1:
When I then test the workflow from within SWDD, the priority gets set to "1" but the pop-up doesn't get shown. When I create the task via the FM in my wrapper program this setting seems to be ignored as the work item gets created with priority "5". I already executed SWU_OBUF and also exited and re-entered SE80 to run the program but to no avail. The FM doesn't seem to have a means to influence the task's priority so I'm wondering if I'm still missing some piece of the puzzle.
Oh, and not sure if "fun" is the operable word here!
Cheers
Baerbel
I'm still struggling with some stuff I don't understand and don't seem to get to work. These are:
My initial expectation had been that the complete work-item text with the link to the guidelines would get "shoved" into the developer's face upon first login or next activity in the system but this - if I'm not missing something - won't be happening. So, at least the pop-up about an express document waiting in the inbox should get displayed.
How can I get this to work?
Cheers
Baerbel
The express notification is not a part of workflow, but a SAPOffice function. It can be enabled/configured in SO16, tab User, box User Notifications.
Either way I would not consider this an ideal primary notification, an email to their main address as a first step would be better - but by all means keep the priority 1 as backup. Popups come and go, even if it works, people don't always read them.
As an alternative: are you using extended notifications for your other workflows? If so, just include this task and an email will be generated automatically, with a link to the task. Talk to your WF people.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Mike!
I somehow thought that the express notification also automatically works with workflow as both WF- and SAPOffice notifications end up in the same "bin", namely the SAP Business Workplace.
With the setup we have, emailing the developers a notification will not work in most cases as that email will just end up in an inbox they will not (yet) know anything about and will therefore not check. My targets for this messaging are mostly external developers who come and go so they won't have internal email-accounts linked to their SAP-user. I therefore have to find a solution to get this information in front of them when they access one of our SAP development systems. I think I'll look for a means to in addition to triggering the work-item from my wrapper program to also send an express messsage to their SAP-user to make sure they check their SAP-inbox.
Cheers
Baerbel
Yes you thought correctly. The express notification is just a popup that there is something in your business workplace.
One could start discussing whether outsourcing really is cheaper, but let's not go there.
It is generally good practice to maintain a valid email address in the user master, even (or especially!) for externals. I guess this is not the case?
It's a bit of a catch-22: even if external developers have their external company address in their user-settings (which is not necessarily the case for all of them), they'll not get emails from the dev-system as that - AFAIK - only allows sending to internal domains (a setting which makes sense to avoid accidentally sending test-output to actual business partners). And, if the email-address goes to an internal address, the external developers/consultants won't be checking that particular account with any regularity. Sending email notifications would be possible from the prod-system but most of the external developers do not get access to that.
Bottom line: I don't see an alternative to poke the developers right within our SAP-development systems.
Thanks, Mike.
Yes, (express) notifications are enabled and work.
I was actually writing a longer answer below while you put up your latest comment. I figured out a way to do this and describe the basics there.
User | Count |
---|---|
76 | |
10 | |
9 | |
8 | |
6 | |
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.