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 Serge,

    select UID_Person

    from Person

    where UID_Person in

    (

              select UID_PersonHead

              from Person

              where UID_Person = '@UID_PersonOrdered'

    )

    so replace * with UID_Person

    Regards,

    Geraldine

  • Now the request was automatically assigned without the manager approval.

    But I have the reason "Automatic system approval: Approval granted by approver." and I don't know why.

    Maybe because the manager was also the requestor?

    Serge

  • Yes, if config parameter QER\ITShop\DecisionOnInsert is enabled.

    HTH,

      Oliver

  • Hi Serge,

    check you config parms in Designer:

    QER\ITShop\PersonInsertedNoDecide

    Regards,

    Geraldine

  • Hi Geraldine,

    thank you for your help.It seems that the name of the parameter is now "DecisionOnInsert".

  • Hi Serge,

    two different things:

    • DecisionOnInsert: Automatically decide if PersonInserted is valid decision maker (of the first approval step as this is only done "on insert")
    • PersonInsertedNoDecide: Remove PersonInserted from the list of valid decision makers (in any approval step)

    HTH,

      Oliver

  • Hi, I would like to reactivate this post.

    I thought my issue was resolved but in fact it was not: another workflow used to be executed.

    I try to calculate a group of approvers, initialy consisting of the target manager.

    First, I put the condition below:

    select UID_Person

    from Person

    where UID_Person in

    (

         select UID_PersonHead

         from Person

         where UID_Person = '@UID_PersonOrdered'

    )

    But when I run the workflow, I meet the error: Aborted. Approval decided by the system, no approver available.

    Maybe it is because it considers the '@UID_PersonOrdered' condition as a string not a variable.

    Then I try without ' ', but I can't save the workflow.

    [881257] The SQL Where clause is invalid.

              at VI.DB.Implementation.SingleDbObject.Save()

              at VI.DB.InternalLoggingCustomizer.Saving()

              at VI.AE.Customizer.PWODecisionStep.OnSaving()

              at VI.AE.Customizer.PWODecisionStep.CheckWhereClause()

    [810023] Error during execution of statement: select uid_person

    from person

    where uid_person in

    (

              select uid_personhead

              from person

              where uid_person = @uid_personordered

    )

    Maybe because I only have the right to use '@UID_PersonWantsOrg' and not '@UID_PersonOrdered'

    So I try this:

    select p.UID_PersonHead

    from Person p

    join PersonWantsOrg pwo

    on p.UID_Person = pwo.UID_PersonOrdered

    where pwo.UID_PersonWantsOrg = '@UID_PersonWantsOrg'

    But I still can't save the workflow.

    [881257] The SQL Where clause is invalid.

              at VI.DB.Implementation.SingleDbObject.Save()

              at VI.DB.InternalLoggingCustomizer.Saving()

              at VI.AE.Customizer.PWODecisionStep.OnSaving()

              at VI.AE.Customizer.PWODecisionStep.CheckWhereClause()

    [881262] The SQL statement for approval procedure 'CP' does not return a result with column 'UID_Person'.

    I changed for:

    select UID_Person

    from Person

    where UID_Person in

    (

         select p.UID_PersonHead

         from Person p

         join PersonWantsOrg pwo

         on p.UID_Person = pwo.UID_PersonOrdered

         where pwo.UID_PersonWantsOrg = '@UID_PersonWantsOrg'

    )

    Now I can save the workflow but I meet the error again: Aborted. Approval decided by the system, no approver available.

    I am not understand why because in object browser this query return the id of the right manager.

    Finally I have copied and pasted the exemple in Quest documentation and I still have the same error when trying to save the workflow.

    select pc.UID_PersonHead from PersonWantsOrg pwo

    join Person p on pwo.UID_PersonInserted = p.UID_Person

    join Department d on p.UID_Department = d.UID_Department

    join ProfitCenter pc on d.UID_ProfitCenter = pc.UID_ProfitCenter

    where pwo.UID_PersonWantsOrg = '@UID_PersonWantsOrg'

    IT-Shop.pdf (page 53).

    Regards,

    Serge

  • Hi Serge,

    why don't you go for CM - Recipient's manager?

    Which is not an analysis of your problem

    Regards,

    Geraldine