Jump to content

getReqQuestions API call returning an error


Recommended Posts

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

Link to comment
Share on other sites

Guest Chaz

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.

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

Guest Chaz

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

@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"...

query_exec.PNG

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>

Link to comment
Share on other sites

@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.

 

Link to comment
Share on other sites

@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...

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...