Human Activity removal

Human Activity removal

How can I remove(close or skip) a Human Activity from the task box when the user has done the task without using the taskbox? I still need the process to continue beyond the Human Activity.
Hi Terry,

You can explicitly close the activity, using the Close<Human Activity> action (you'll need the related ActivityId for that):

Another option is using the 'Close On (create/update)' property on the human activity:

This way you can configure the entity attributes as a filter, for determining when the activity is closed (based on a related insert/update). Note that, if you need extra control, you can also add a 'Close On' callback, on which you can raise an error if you want to cancel the activity transition:

Thanks Paulo,
Here is the situation: Upon creation of a new “X” entity I launch a process that includes the human activity, which is for the user to upload a document associated with X. When the human activity is closed (or skipped) the process sends a notification email, then ends. The user could upload the document without using the taskbox, and I want to close the human activity if they do.
I’d like to use your first suggestion, Close<human activity>, but the only way I could see to get the ActivityId is to pass it as an argument to the Human Activity’s destination, which would only happen when the user used the taskbox option. What I hoped to be able to do is to find some other way to get that ActivityId when the upload takes place outside of the taskbox.

 Maybe I could use the On Close, but I don’t understand the operation of the Update attributes option; how do I use an attribute as a “filter”? For example, say I have a related key attirubute in X which is the DocumentId of where the uploaded document is stored. I could have the condition that the Human Activity be closed when X is updated, and DocumentId <> NullIdentifier(). But it doesn’t let me put a condition in that On Close argument, it wants a Document Identifier type.

Any ideas?
Hi Terry,

See attached a small sample app (follow the reminders in the eSpace).
The eSpace has a process with a single activity. It can be closed in the taskbox or in the Show screen. Note the On Ready callback in the activity, where a behavior is created, allowing us to find the activity later in the UI.

Hi Paulo,

I'm trying to close the HumanActivity on the OnReady of the HumanActicity it is possible?

I need do this because I want the History of all activities and this is to close automatically because we have all the information.

With this code:

I have this error:

Can you help?

Plácido Miranda
Hi Placido,

A few days ago I had a similar scenario, Its not possible to close a Human Activity on its OnReady Callback.
You'll have to Close the activity using any of the below methods:
1) Done button on the Taskbox
2) using the CloseHumanActivity on a Webscreen Action
3) using the CloseHumanActivity on a parallel Automatic Activity
4) Use the CloseOn property of the Human Activity and validate using the OnClose CallBack

If you want to use option 3,
to get the Human Activity Id you will have to Expose Process Entity, query the process Entity joined with Activity,Process,Activity_Defination. You will have to test the query to make sure that you only get one row.

In my case, I had a cyclic workflow and needed to log its history here's how I did it

Thanks Charles,

I chose the 3 option. I have created a conditionalStar that close my human activity.

On OnReady i call that ConditionalStart.


Hi Placido,

Charles alread gave a great answer, let me just add that, if you're closing the human activity automatically right after it's ready (because on certain instances of your process you already have all the info), then you still have another option: don't execute the human activity at all (precede it with a decision in the process design).

Remember that if you're interested later on in bulding reports on this process (e.g. average time this activity takes to complete), then you'll be forced to exclude these "automatic closed" instances, otherwise they will influence the data.
Hi Paulo,

That was my initial idea. Unfortunately, the way the application is planned I need to have activityid, which is only generated in onReady. If not i have to change all queries.

When I close the task I use one system user which in the reports will help differentiate who did what.

Plácido Miranda