Is there any process to trigger(Approval workflow B) after the action taken by (Approval workflow A).

Hi All,

Here we have a scenario where one process dependent on other.

Step 1 : we have Approval workflow where Manager approves the request for account creation.

Step 2 : Then we have an other workflow where group owner approves the request for group addition to the account.

So here we need to know whether the Manager approval has done or not? If yes then it should for group owner approval which is step2 different approval workflow.

Both the approval workflows are different.
So do we have any existing customization that stpe2 waits until the step1 complete's.

Parents
  • Hi,

    I have implemented 'waits' in approval workflows that wait for the approval of a 'parent' product before the approval of a child (dependent) product can proceed.  This was done (in the past) with a WC step that called the following SQL function (custom implemented to the DB):

    CREATE function dbo.CCC_WaitForSubPWOs(@uid_personwantsorg nvarchar(38))
    returns int
    as
    begin

    declare @result int
    select @result = 0

    if not exists (
    select 1
    from PersonWantsOrg pwo
    where
    UID_PersonWantsOrgParent = @uid_personwantsorg
    and OrderState in (select OrderState from viPWOOrderState where IsOrder = 1)
    ) begin
    select @result = 1
    end


    if exists (
    select 1
    from PersonWantsOrg pwo
    where
    UID_PersonWantsOrgParent = @uid_personwantsorg
    and OrderState in (select OrderState from viPWOOrderState where IsClosed = 1 and IsGranted = 0)
    ) begin
    select @result = -1
    end

    return (@result)

    end

    Your case is slightly more complicated as the approval workflow that has to wait is not the same workflow.

    The best practice today is to use EX instead of WC ..... so you'll need to identify a relationship between the first ordered product and the second ordered product ...... then in your EX step you might call a script (that probably takes a parameter of 'this' workflow's UID_PersonWantsOrg) .... this script will use the current UID_PersonWantsOrg to find and check the status of the other UID_PersonWantsOrg and return the relevant MakeDecision result.

    HTH, Barry.

Reply
  • Hi,

    I have implemented 'waits' in approval workflows that wait for the approval of a 'parent' product before the approval of a child (dependent) product can proceed.  This was done (in the past) with a WC step that called the following SQL function (custom implemented to the DB):

    CREATE function dbo.CCC_WaitForSubPWOs(@uid_personwantsorg nvarchar(38))
    returns int
    as
    begin

    declare @result int
    select @result = 0

    if not exists (
    select 1
    from PersonWantsOrg pwo
    where
    UID_PersonWantsOrgParent = @uid_personwantsorg
    and OrderState in (select OrderState from viPWOOrderState where IsOrder = 1)
    ) begin
    select @result = 1
    end


    if exists (
    select 1
    from PersonWantsOrg pwo
    where
    UID_PersonWantsOrgParent = @uid_personwantsorg
    and OrderState in (select OrderState from viPWOOrderState where IsClosed = 1 and IsGranted = 0)
    ) begin
    select @result = -1
    end

    return (@result)

    end

    Your case is slightly more complicated as the approval workflow that has to wait is not the same workflow.

    The best practice today is to use EX instead of WC ..... so you'll need to identify a relationship between the first ordered product and the second ordered product ...... then in your EX step you might call a script (that probably takes a parameter of 'this' workflow's UID_PersonWantsOrg) .... this script will use the current UID_PersonWantsOrg to find and check the status of the other UID_PersonWantsOrg and return the relevant MakeDecision result.

    HTH, Barry.

Children