Setting success criteria

(imported topic written by SystemAdmin)

Hi all,

I notice in the API documentation for the FixletActionCreator:

HRESULT SetFixletRelevance ( BSTR relevance );

The original fixlet’s relevance. This expression must be true before the action can be applied, and the action will be successful when it becomes false.

How can I set the success criteria for a task? (i.e. successful when all lines have been executed)

Thanks,

Paul.

(imported comment written by SystemAdmin)

It actually looks like the success criteria for the action is being set to:

“This action will be considered successful when it runs to completion.”

in the console

even when

the relevance is specified.

Could it be that there’s a problem with the API around defining success criteria?

(imported comment written by SystemAdmin)

This is the fundamental difference between a Fixlet and an Action.

With a Fixlet, the agent checks to make sure things were Fixed, ie the Relevance is no longer true.

With an Action, the agent simply checks to see that it completed the required steps.

(imported comment written by MattBoyd)

By no means am I an expert in the platform API, but it looks like there isn’t a way to set that with the

FixletActionCreator

interface. Also, the 8.2 documentation says the

FixletActionCreator

interface is deprecated, so you might want to look at converting to the BESXMLImport

(imported comment written by MattBoyd)

Sorry, accidentally hit submit… I really dislike the developerWorks forums. Complete message below…

By no means am I an expert in the platform API, but it looks like there isn’t a way to set that with the FixletActionCreator interface. Also, the 8.2 documentation says the FixletActionCreator interface is deprecated, so you might want to look at converting to the BESAPI.XMLImporter interface, and creating Fixlets/Actions using the XML specification (which is documented in the XSD schema files that are included in the platform API). Here’s the schema info for the “SuccessCriteria” element:

<xs:complexType name=
"ActionSuccessCriteria"> <xs:simpleContent> <xs:extension base=
"RelevanceString"> <xs:attribute name=
"Option"> <xs:simpleType> <xs:restriction base=
"xs:string"> <xs:enumeration value=
"RunToCompletion" /> <xs:enumeration value=
"OriginalRelevance" /> <xs:enumeration value=
"CustomRelevance" /> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:extension> </xs:simpleContent> </xs:complexType>

Example:

<SuccessCriteria Option=
"OriginalRelevance"></SuccessCriteria>

Tim, AFAIK the success criteria can be in both Fixlets and Tasks. Attached is a screenshot of how how it’s set in a task.

(imported comment written by SystemAdmin)

Thanks for all the feedback guys.

Yes, it looks like the FixletActionCreator is on the way out, and not really suitable for setting specific success criteria values.

One nice point that it did have though was that it allowed you to set parameters programmatically. From what I can see, there is no way to achieve that using the XML importer. Or is there…?

(imported comment written by SystemAdmin)

Looks like bug #11028 has been raised for the parameters issue above, so I’ll have to keep an eye out for that one.

In the meantime, I’m going to update the name of the action to append the parameter values I need, and then use “regex” in my relevance expression to extract them back. Seems a reasonable temporary compromise for my needs.

So, going to flag this question as answered now.