Topic
  • 5 replies
  • Latest Post - ‏2014-02-13T02:25:18Z by chrisc
AdapterDeveloper
AdapterDeveloper
36 Posts

Pinned topic Need to differentiate process and parent process in ITIM account suspend workflow

‏2013-11-28T08:07:09Z |

Hi ,

 

I want to write some code in ITIM account suspend workflow so that I can verify how the ITIM account is getting suspended.

 

  1. Administrator can suspend user directly where user's ITIM account suspension workflow will be triggered.
  2. Administrator can suspend all the user account after selecting all account check box. In that case also ITIM account suspension workflow will be triggered (mentioned in the screen shot attached).
  3. Administrator can suspend only ITIM account only.

 

I can differentiate the third case from 1st and 2nd using process and parent process option in the ITIM account suspension workflow.

 

But my question is how to differentiate between the first two if I am in the ITIM account suspension workflow.

 

I have used below code but could not differentiate.

 

var reqstrName = "";

reqstrName = process.requestorName;

process.auditEvent("requester Type is: "  +process.requestorType);

process.auditEvent("Description of the process is: "  +process.description);

process.auditEvent("Process comment is: "  +process.comment);

process.auditEvent("process Name is: "  +process.name);

process.auditEvent("Requestee DN is: "  +process.requesteeDN);

process.auditEvent("Requestee Name is: "  +process.requesteeName);

process.auditEvent("Subject of the Process is: "  +process.subject);

process.auditEvent("type of the Process is: "  +process.type);

process.auditEvent("Root Process is: "  +process.getRootProcess());

process.auditEvent("Root requester name is: "  +process.getRootRequesterName());

process.auditEvent("requester Name is: "  +reqstrName);

 

 

process.auditEvent("Process Parent ID is: "  +process.parentId);

var parent = process.getParent();

process.auditEvent("Parent is: "  + parent);

if(parent!=null){

process.auditEvent("Description of the parent: "  +parent.description);

process.auditEvent("Parent Name is: "  + parent.name);

process.auditEvent("Parent Type is: "  + parent.type);

process.auditEvent("Subject of the Parent is: "  +parent.subject);

 

}

Attachments

  • yn2000
    yn2000
    1112 Posts

    Re: Need to differentiate process and parent process in ITIM account suspend workflow

    ‏2013-12-03T00:43:57Z  

    I am not sure I understand what is the diff. between 1st and 2nd. Both are about suspend user process, right?

    Rgds. YN.

  • Kishore_vj
    Kishore_vj
    4 Posts

    Re: Need to differentiate process and parent process in ITIM account suspend workflow

    ‏2013-12-24T06:30:13Z  

    You can use the below API to identity if the request is triggered manually or automatically. Using this you can differentiate between scenerio 1 & 2

    Process.requestorType

    Description
    This read-only field is a String that categorizes the requestor. The potential
    categories, or types, are:
     U for user
     S for the workflow engine
     P for the system
    Usage
    x = process.requestorType;
    if (x == "U")
    ...
    else if (x == "S")
    ...
    else if (x == "P")

  • frisalde
    frisalde
    73 Posts

    Re: Need to differentiate process and parent process in ITIM account suspend workflow

    ‏2014-02-12T15:54:35Z  

    You can use the below API to identity if the request is triggered manually or automatically. Using this you can differentiate between scenerio 1 & 2

    Process.requestorType

    Description
    This read-only field is a String that categorizes the requestor. The potential
    categories, or types, are:
     U for user
     S for the workflow engine
     P for the system
    Usage
    x = process.requestorType;
    if (x == "U")
    ...
    else if (x == "S")
    ...
    else if (x == "P")

    What is the differences between process.requestorType=='S' and process.requestorType=='P'?

    I have made some trials modifying an account.

    * the process.requestorType=='U' is shown when the operations is done by an end user.

    * the process.requestorType=='S' is shown when the operations is triggered by a PolicyEnforcement

    Could is process.requestorType=='P' related to reconciliations?.

     

    Thanks in advance

  • frisalde
    frisalde
    73 Posts

    Re: Need to differentiate process and parent process in ITIM account suspend workflow

    ‏2014-02-12T16:31:11Z  
    • frisalde
    • ‏2014-02-12T15:54:35Z

    What is the differences between process.requestorType=='S' and process.requestorType=='P'?

    I have made some trials modifying an account.

    * the process.requestorType=='U' is shown when the operations is done by an end user.

    * the process.requestorType=='S' is shown when the operations is triggered by a PolicyEnforcement

    Could is process.requestorType=='P' related to reconciliations?.

     

    Thanks in advance

    By the way, how can the information recorded by the auditEvent method be consulted, for instance, from a child process? This way would allow to pass additional information between process

  • chrisc
    chrisc
    8 Posts

    Re: Need to differentiate process and parent process in ITIM account suspend workflow

    ‏2014-02-13T02:25:18Z  
    • frisalde
    • ‏2014-02-12T15:54:35Z

    What is the differences between process.requestorType=='S' and process.requestorType=='P'?

    I have made some trials modifying an account.

    * the process.requestorType=='U' is shown when the operations is done by an end user.

    * the process.requestorType=='S' is shown when the operations is triggered by a PolicyEnforcement

    Could is process.requestorType=='P' related to reconciliations?.

     

    Thanks in advance

    I believe "S" is system process and "P" is workflow engine. So the request type will be "P" for a sub-process called by another workflow process. For example, when you use an operation node to call another operation workflow.