Need to get tp!owner and to save in Database field once the user accepts a task but has not submitted the task yet.

There is a scenario where we need to identify who is currently working on the task. So, the user who accepts the task needs to be captured before the task completion. The user who accepts the task (i.e tp!owner) needs to be stored in a db field. Also, if the user after accepting the task, reassigns it to another user or rejects it then, whoever accepted this task needs to be updated in that db field.

We can store tp!owner details in a process variable once the task is submitted. However, we want it to be stored before the task submission. 

 

I created an expression rule which calls a!queryProcessAnalytics() to get tp!owner and tried using it in rule event.

Rule event is checking, if tp!owner is not null then a db write is done. However, my process is getting paused. I don't understand why the expression rule haivng a!queryProcessAnalytics() is not getting evaluated in rule event?

Is there any other way to implement this scenario.

 

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer
    Hi
    Get task id by task name from process properties
    Based on that get the status of task
    And tp!owner
    If status is assigned and tp!owner =null
    Task assigned but not accepted
    If status is accepted and tp!owner have value
    Task is accepted save value in db
    You need to track this in parallel flow
    Which will continuously monitor your task in running process.
Reply
  • +1
    Certified Lead Developer
    Hi
    Get task id by task name from process properties
    Based on that get the status of task
    And tp!owner
    If status is assigned and tp!owner =null
    Task assigned but not accepted
    If status is accepted and tp!owner have value
    Task is accepted save value in db
    You need to track this in parallel flow
    Which will continuously monitor your task in running process.
Children