Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Charles Colaco
91
Views
5
Comments
Can a Taskbox display Activities without setting the Status to Open when Clicked?
Question
BPT
OutSystems Widgets
I have a Human Activity that needs to behave like a notification for a specific time,
this Activity is assigned to a group of users and will be closed explicitly.
The problem is, when any user from the group opens that activity, other users cannot view the activity.
until the user releases it. I understand that this is the intended BPT behaviour.
I know I can acheive this without using BPT, but since my users will be using the Taskbox extensively, I want to display this as a notification in the Taskbox.
Here's my scenario,
User A creates a transaction and a Group of Users need to be notified in their Taskbox.
A few days Later User A will change a status in the Transaction and the notification will disapper from the Users Taskbox.
User X, User Y logs in
Both of them see the activity in their Taskbox, if User X clicks the Activity, it disappers from User Y's Taskbox, until User X releases the activity.
I need to override this behaviour to make the Activity available to all users in the group until the Activity is explicitly closed by User A.
Process Flow:
User A creates a record (which has an attribute GroupId as a foreign key).
1. New Process NotifyUsers is Launched
2. OnReady of the First Human Activity
Action ActivitySetGroup is called setting the activity to the specifc Group.
Action API_SetActivityVisualization is called to hide the Done Button.
3. HumanActivity is Launched, which has a destination Screen, details and instructions.
This Activity has to be available to all the users in the group even if other users click on it
4. HumanActivity is set to Close on the Transaction's Status Update
4. User A updates the Transaction Status and the HumanActivity is closed.
5. Process is ended.
Ideally I want both users to be able to click the Activity, view the instructions and navigate to the destination.
Release Button will be hidden using Action API_SetActivityVisualization
Is it possible to keep a HumanActivity in the Ready State, be able to Navigate and view instructions without Opening It?
Charles Colaco
I solved the above problem by adding a non-mandatory Input parameter ActivityId to the Destination Screen.
Pass the ActivityId to this screen from the HumanActivity.
In the preparation of the Destination Screen I added the following logic,
If the ActivityId is not null then Call Action ActivityReset.
The problem is almost solved, but an
Open
Button is displayed in the taskbox.
Nuno Reis
MVP
The easiest way to code it, is in the preparation of destination screen, set the activity as Released.
That way, when the user clicks, it Marks the Activity as Open, but jumps to a screen that will release it in that same second.
Like that you don't need to change anything in Taskbox.
Charles Colaco
Thanks Nuno,
Thats what I did, how do I hide the
Open
Button in the Taskbox
To hide the Done & Release Buttons, I am using the Action API_SetActivityVisualization from EPA_Taskbox System Espace.
Also, I was trying to use a Session Variable for storing the ActivityId in the onOpen or OnReady Callback Actions
and In the Preparation I was checking the Session.ActivityId
This approach was not working because on the Preparation of the Screen Session.ActivityId was always defaulting to Null for subsequent Clicks since the onOpen is only called once
Paulo Ramos
Staff
Hi Charles,
We've already discussed this topic, I'm just sharing our thoughts with the Community (and maybe someone will be able to provide a different approach).
The built-in taskbox was not really designed for multi-user notifications, so I see these distinct options:
1.
Use a
custom taskbox
(that would also display notifications) instead of the built-in taskbox.
2.
In order to keep using the built-in taskbox, create one process for each user... This would mean, when starting the workflow, doing a query to Group / Group_User entities (to get all members), then starting a process for each user. Eventually, later on you would have to terminate all related processes in a similar way. This seems a bit messy, though...
3.
Add a notification area, independent from the taskbox (clearly separating notifications from activities). For example, visually similar to facebook / linkedin notifications, which the users will probably recognize very easily.
Regarding the last remark (about the session variable): generally, session vars are NOT shared between your browsing session (which relies on a cookie to identify the session) and BPT (which runs asynchronously in the server).The only exception is Session.UserId, that you can use in the OnOpen callback in order to identify the user opening the activity.
Charles Colaco
Hi Paulo,
I went with option 1, and forged it
Taskbox Plus
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...