carlt Posted May 25, 2017 Posted May 25, 2017 Hi We're having issues with the getReqQuestions API method call. We're passing the 3 required parameters (in the correct order) bpmId, requestId and formId but the response is 'Failed to load FlowCode script'. The logs also show: Failed to load the script for operation '\\?\D:\Hornbill\ESP Server\instances\lbdigitalservices\apps\com.hornbill.core\entities\Requests\fc_ops\getReqQuestions.xml' Is there a problem with this API call? What we are trying to do is pull the progressive capture answers for a given a request and getReqQuestions seemed to be the most appropriate call. Is there another method we could use? Thanks Carl
Guest Chaz Posted May 25, 2017 Posted May 25, 2017 This is a business process specific operation, so the relevant folder would be fc_bpm not fc_ops. If that works for you, great, but just FYI that these operations are intended to be used by a Business Process and not called directly so not sure if you'll get everything you need from it.
carlt Posted May 25, 2017 Author Posted May 25, 2017 Thanks Chaz I'm invoking with xmlmc.Invoke("apps/com.hornbill.servicemanager/Requests", "getReqQuestions") I assume the location of the script is hardwired into the API? Can you specify the location somehow? If getReqQuestions should only be used by a Business Process, is there another call that can return the progressive capture answers? Thanks Carl
Victor Posted May 25, 2017 Posted May 25, 2017 @carlt you can use queryExec data API to get the request questions...https://api.hornbill.com/data/?op=queryExec Application is com.hornbill.servicemanager and query name is getRequestQuestions. In parameters section you would need to specify the request ID: <queryParams> <requestId><request_ID></requestId> </queryParams>
Guest Chaz Posted May 25, 2017 Posted May 25, 2017 Doh! Of course, I clearly forgot that you don't specify the fc_ops as part of the path. Victor has it right with the API call you need to make.
carlt Posted May 25, 2017 Author Posted May 25, 2017 Thanks for that Victor/Chaz However, It only appears to be returning a count of the rows (h_count) not the actual questions/answers. Does getRequestQuestions just return a count? Is there another query that will return the question/answers or what are we doing wrong? Thanks Carl
Victor Posted May 25, 2017 Posted May 25, 2017 @carlt most likely your API call is not returning any meta data... As you can see in the documentation the default value for the returnMeta and returnUsermeta is "false"... Basically your (most basic) API call XML configuration should look like this: <methodCall service="data" method="queryExec"> <params> <application>com.hornbill.servicemanager</application> <queryName>getRequestQuestions</queryName> <returnMeta>true</returnMeta> <returnUserMeta>true</returnUserMeta> <queryParams> <requestId><...></requestId> </queryParams> </params> </methodCall>
carlt Posted May 25, 2017 Author Posted May 25, 2017 @Victor I did have a look at setting the meta parameters to true but it just gave some further detail about the one column (h_count) returned i.e.: <userMetaData><title>getRequestQuestions</title></userMetaData> <metaData><columns><column name="h_count" type="BIGINT" nullable="false"></column></columns></metadata> FYI i'm using the Hornbill .Net library but if I use xmlmc.GetInvokeXML("data", "queryExec") I get the exact same API call XML configuration as in your last post.
Victor Posted May 25, 2017 Posted May 25, 2017 @carlt hmm... indeed it seems the "getRequestQuestions" stored query will return a count() by default... right, in this case we can try this: <methodCall service="data" method="queryExec"> <params> <application>com.hornbill.servicemanager</application> <queryName>getRequestQuestions</queryName> <returnMeta>true</returnMeta> <returnUserMeta>true</returnUserMeta> <queryParams> <requestId><...></requestId> </queryParams> <queryOptions> <resultType>allData</resultType> </queryOptions> </params> </methodCall> If this still does not work there is another alternative...
carlt Posted May 25, 2017 Author Posted May 25, 2017 Thanks @Victor the resultType allData option does indeed return the rest of the data we're after. Thanks for your help
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now