Execute ICriteria filter against Agile Object using custom code with the Agile SDK.

We need to send an email to a User and that User’s Transfer Authority given a Change Order. It seems we will need to write custom code to determine whether an ICriteria has been met and which User the Authority has been transferred to.

Given an `ICriteria` and an `IChange`, is it possible to use the built in Agile Business Rules Engine to determine if that change order successfully matches the criteria?

Something like:

ICriteria criteria = getAllChangeOrderCriteria();
IChange changeOrder = getCurrentChangeOrder();

if (passesCriteria(criteria, changeOrder)) {
   /// dosomething
}

I am really hoping we don’t have to write our own Lexer and Parser to execute the Business Rules defined by an ICriteria and can obtain access to the Engine used by Agile PLM itself.

Add Comment
1 Answer(s)

Hello

  I don’t think there is something for exactly what you are describing

  However, in order to find the Transfer authority for a giver user/change, there is SDK available. I haven’t personally tried it, but looks like this will give the info you are looking for. This is available for IChange

IDataObject [] getPossibleTransferredFromUsers ( IStatus  status  )  throws APIException

Retrieves an array of users that are transfer authorities of the current user for a particular workflow status.

Parameters:
  status  a node corresponding to the desired workflow status. You can retrieve the current status using getStatus(). To retrieve the default next status, use getDefaultNextStatus().
Returns:
an array of IUser and IUserGroup objects
Exceptions:
  APIException  if the method fails
Since:
9.2.2.2

Hope this helps

– Raj

Agile Angel Answered on April 19, 2019.

This looks like it’s what I would want. I’ll work with it and mark your answer once it’s confirmed. Thank you!

on April 19, 2019.

Hello

  Were you able to try this out? If so, please share your results. Never tried this SDK and hence curious to see if it works

on April 29, 2019.

I was finally able to try this, and it does not appear to do what we need. In fact, it returns nothing. We setup a Change, assigned Approvers, setup a Transfer Authority, and then invoke this method. It returns an empty array. The name seems to imply it would return the users something was transfered from. We need to know all of the users that could approve in the place of another user.

I verified that the Transfer Authority itself is working properly within the PLM platform. No matter which API method is called, it will not return a list of Users which have their Authority Transferred to them.

on May 1, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.