Hi Indy,

Thanks for your reply. Yes we have tried loading the pipeline via the admin
UI and it works fine using the format you describe - however we really want
to use the management API as the admin UI requires file system access on
the server where MarkLogic and this will not always be available to us.

Rob


On 22 June 2016 at 10:05, Indrajeet Verma <indrajeet.ve...@gmail.com> wrote:

> Hi Rob,
>
> Have you tried to load pipeline via admin UI and seeing same error?
>
> I am using ML8.0-4 and below code works with the options however I have
> loaded pipeline via UI.
>
>     <state-transition>
>         <annotation>
>             When a document is zip,
>         </annotation>
>         <state>http://marklogic.com/states/initial</state>
>         <on-success>http://marklogic.com/states/transformed</on-success>
>         <on-failure>http://marklogic.com/states/error</on-failure>
>         <execute>
>             <condition>
>
> <module>/MarkLogic/cpf/actions/mimetype-condition.xqy</module>
>                 <options
> xmlns="/MarkLogic/cpf/actions/mimetype-condition.xqy">
>                     <mime-type>application/zip</mime-type>
>                 </options>
>             </condition>
>             <action>
>                 <module>action/extract-zip.xqy</module>
>             </action>
>         </execute>
>     </state-transition>
>
> Regards,
> Indy
>
> On Wed, Jun 22, 2016 at 2:11 PM, Rob Walpole <robkwalp...@gmail.com>
> wrote:
>
>> Hi,
>>
>> We are trying to load a CPF pipeline via the RESTful Management API and
>> this fails with an invalid node error when there is an options element
>> present within /pipeline-properties/state-transition/execute/condition
>>
>> The full error message is as follows:
>>
>> <error xmlns="http://marklogic.com/xdmp/error";>
>>   <status-code>400</status-code>
>>   <status>Bad Request</status>
>>   <message-code>MANAGE-INVALIDPAYLOAD</message-code>
>>   <message>MANAGE-INVALIDPAYLOAD: (err:FOER0000) Payload has errors in
>> structure, content-type or values. XDMP-VALIDATEUNEXPECTED: (err:XQDY0027)
>> validate strict { $pipeline } -- Invalid node: Found pp:options but
>> expected any(lax,!(http://marklogic.com/manage/pipeline/properties))? at
>> fn:doc("")/pp:pipeline-properties/pp:state-transition/pp:execute/pp:condition/pp:options
>> using schema "manage-pipeline-properties.xsd"</message>
>> </error>
>>
>> The problem node looks like this:
>>
>> <condition>
>>     <module>/MarkLogic/cpf/actions/mimetype-condition.xqy</module>
>>         <options>
>>             <mime-type>application/xml</mime-type>
>>         </options>
>> </condition>
>>
>> We have also tried putting the options element in as..
>>
>> <options xmlns="/MarkLogic/cpf/actions/mimetype-condition.xqy">
>>     <mime-type>application/xml</mime-type>
>> </options>
>>
>> ..which is how it is described in the Content Processing Framework Guide
>> but this fails with a different error as follows:
>>
>> <error xmlns="http://marklogic.com/xdmp/error";>
>>   <status-code>500</status-code>
>>   <status>Internal Server Error</status>
>>   <message-code>XDMP-VALIDATEUNEXPECTED</message-code>
>>   <message>XDMP-VALIDATEUNEXPECTED: (err:XQDY0027) validate strict {
>> $pipeline } -- Invalid node: Found p:options but expected any(lax,!(
>> http://marklogic.com/cpf/pipelines))? at
>> /p:pipeline/p:state-transition/p:execute/p:condition/p:options using schema
>> "pipelines.xsd"</message>
>> </error>
>>
>> If we remove the options element the pipeline loads via the API with no
>> problems.
>>
>> We are using MarkLogic Server Enterprise Edition 8.0-4.2
>>
>> Many thanks
>> Rob Walpole
>>
>> _______________________________________________
>> General mailing list
>> General@developer.marklogic.com
>> Manage your subscription at:
>> http://developer.marklogic.com/mailman/listinfo/general
>>
>>
>
> _______________________________________________
> General mailing list
> General@developer.marklogic.com
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to