This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ITShop - Approval workflow - Calculated group of approvers

Hi,

I try to use the "CP - Calculated group of approvers" procedure.

First I try to select the manager of the "UID_PersonOrdered" person with the condition below:

select *

from Person

where UID_Person in

(

          select UID_PersonHead

          from Person

          where UID_Person = '@UID_PersonOrdered'

)

But the request was aborted with the following reason: "Approval decided by the system, no approver available."

This is why I suppose my condition is not correct.

Does anyone see the error?

Regards,

Serge

  • Hi Geraldine,

    I am aware that CM - Recipient's manager is the right way made an approval for the target manager.

    But as you guessed, here the target manager is just a excuse to learn to use CP - Calculated group of approvers step.

    Regards,

    Serge

  • Hi Serge,

    this statement is the best base:

    select p.UID_PersonHead

    from Person p

    join PersonWantsOrg pwo

    on p.UID_Person = pwo.UID_PersonOrdered

    where pwo.UID_PersonWantsOrg = '@UID_PersonWantsOrg'

    ... but you have to add an alias because the statement must return exactly one column with the name UID_Person:

    select p.UID_PersonHead as UID_Person

    from Person p

    join PersonWantsOrg pwo

    on p.UID_Person = pwo.UID_PersonOrdered

    where pwo.UID_PersonWantsOrg = '@UID_PersonWantsOrg'

    I have two ideas to the problem:

    1. The requestor is the same as the decider and your config parm "QER\ITShop\PersonInsertedNoDecide" is active.

    2. You are using an Oracle server for the Q1IM database.

    In this case you have to use "v_uid_personwantsorg" instead of "@UID_PersonWantsOrg".

    Regards,

    Steffen

  • Hi Steffen,

    Thank you for the "alias advice" which is much more convenient.

    You are right, the requestor is also the decider but the QER\ITShop\PersonInsertedNoDecide parameter is already inactive (as well as the QER\ITShop\DecisionOnInsert parameter).

    I am using an Oracle database server (apologizes to have not mention this point before) but I meet the same error with v_uid_personwantsorg.

    Regards,

    Serge

  • Hi Serge,

    I'm running out of ideas.

    (nearly)

    In PersonWantsOrg we have 2 different UID_Person fields:

    UID_PersonInserted ... the person which CREATES the request

    UD_PersonOrdered ... the person which is the RECIPIENT of the order.

    I think the latest condition in the CP step is:

    select p.UID_PersonHead as UID_Person

    from Person p

    join PersonWantsOrg pwo

    on p.UID_Person = pwo.UID_PersonOrdered

    where pwo.UID_PersonWantsOrg = 'v_uid_personwantsorg'

    That means:

    The decider is the manager (UID_PersonHead) of the recipient.

    It's a very simple condition and should work.

    Are you sure that the recipient has a manager assigned?

    Additionally you can check the config parm "QER\ITShop\PersonOrderedNoDecide"

    (I'm not sure if the creator is the same as the recipient)

    Regards,

    Steffen

  • Hi Steffen,

    The QER\ITShop\PersonOrderedNoDecide parameter is inactive too.

    The recipient has an assigned manager (in UID_PersonHead) which is the requestor.

    I have checked the sql query in object browser, replacing 'v_uid_personwantsorg' by the PWO object id and it returns the manager id.

    I just opened a ticket on the dell support.

    Edit: my mistake was to use UID_PersonInserted instead of UID_PersonOrdered, the approval works now.

    Regards,

    Serge

  • I have created a custom procedure with the same query as above but my approval is getting aborted saying that the decision is being calculated. help me as i have created a lot may procedures and in every procedure i am getting the same error.