/ / Validar xpdl com esquema xsd - xml, xsd, bizagi

Valide o xpdl com o esquema xsd - xml, xsd, bizagi

Estou com o seguinte problema:

Estou precisando ler algum processo que está no formato xpdl que é um xml específico para processar. Esses xpdl são gerados pelo Bizagi.

No site oficial do xpdl peguei o esquema xml, mas quando tento validar o xpdl que é gerado pelo bizagi com o esquema xml que pego do site está dando um erro.

Tentei entender o que pode ter acontecido, mas não entendi.

Você pode me ajudar a entender?

Estou enviando o erro:

 ["level"]=> int(2)
["code"]=> int(1871)
["column"]=> int(0)
["message"]=> string(596) "Element "{http://www.wfmc.org/2009/XPDL2.2}Activities": This element is not expected. Expected is one of ( {http://www.wfmc.org/2009/XPDL2.2}DataStoreReferences, {http://www.wfmc.org/2009/XPDL2.2}Transitions, {http://www.wfmc.org/2009/XPDL2.2}DataAssociations, {http://www.wfmc.org/2009/XPDL2.2}ExtendedAttributes, {http://www.wfmc.org/2009/XPDL2.2}Assignments, {http://www.wfmc.org/2009/XPDL2.2}PartnerLinks, {http://www.wfmc.org/2009/XPDL2.2}Object, {http://www.wfmc.org/2009/XPDL2.2}Participants, {http://www.wfmc.org/2002/XPDL1.0}DataFields, {http://www.wfmc.org/2009/XPDL2.2}Applications ). "
["file"]=> string(66) "file:///C:/Users/dieferson.medeiros/AppData/Local/Temp/php1DBF.tmp"
["line"]=> int(117)

Segue o código que uso para validar o xpdl com o esquema xml:

libxml_use_internal_errors (true);
$xml = new DOMDocument();
$xml->load($file->getPathname());
var_dump($xml->schemaValidate(__DIR__."/../../../../web/uploads/xsd/xpdl.xsd"));
var_dump(libxml_get_errors());

Segue o link para o xpdl:

https://drive.google.com/file/d/0B1uwndG8_xlZSHBzZHZMTUZ0dkk/view?usp=sharing

Segue o link para o esquema xml:

https://drive.google.com/file/d/0B1uwndG8_xlZblpZUmY2NkxXaGc/view?usp=sharing

Obrigado pela sua atenção.

Respostas:

0 para resposta № 1

O que está dizendo é que o elemento Atividades não está bem localizado.

Eu validei seu .xpdl contra XPDL 2.2 Standard da WFMC

E recebo 9 erros:

1. "Error: The required attribute "Id" is missing."
2. "Error: The required attribute "Id" is missing."
3. "Error: The required attribute "Id" is missing."
4. "Error: The element "Lane" in namespace "http://www.wfmc.org/2009/XPDL2.2" has invalid child element "ExtendedAttributes" in namespace "http://www.wfmc.org/2009/XPDL2.2". List of possible elements expected: "Performers, NestedLane" in namespace "http://www.wfmc.org/2009/XPDL2.2" as well as any element in namespace "##other"."
5. "Error: The element "Lane" in namespace "http://www.wfmc.org/2009/XPDL2.2" has invalid child element "ExtendedAttributes" in namespace "http://www.wfmc.org/2009/XPDL2.2". List of possible elements expected: "Performers, NestedLane" in namespace "http://www.wfmc.org/2009/XPDL2.2" as well as any element in namespace "##other"."
6. "Error: The element "Lane" in namespace "http://www.wfmc.org/2009/XPDL2.2" has invalid child element "ExtendedAttributes" in namespace "http://www.wfmc.org/2009/XPDL2.2". List of possible elements expected: "Performers, NestedLane" in namespace "http://www.wfmc.org/2009/XPDL2.2" as well as any element in namespace "##other"."
7. "Error: The element "Associations" in namespace "http://www.wfmc.org/2009/XPDL2.2" has incomplete content. List of possible elements expected: "Association" in namespace "http://www.wfmc.org/2009/XPDL2.2"."
8. "Error: The element "Artifacts" in namespace "http://www.wfmc.org/2009/XPDL2.2" has incomplete content. List of possible elements expected: "Artifact" in namespace "http://www.wfmc.org/2009/XPDL2.2"."
9. "Error: The element "WorkflowProcess" in namespace "http://www.wfmc.org/2009/XPDL2.2" has invalid child element "Activities" in namespace "http://www.wfmc.org/2009/XPDL2.2". List of possible elements expected: "DataStoreReferences, Transitions, DataAssociations, ExtendedAttributes, Assignments, PartnerLinks, Object, Extensions" in namespace "http://www.wfmc.org/2009/XPDL2.2"."

... Mas não aquele que você compartilhou conosco. Como vejo em seu arquivo, o Activities está bem localizado:

<WorkflowProcess>
...
<Activities>...<Activities/>
</WorkflowProcess>

Você poderia verificar se o arquivo está correto e / ou verificar os erros que eu passo a você? Seu esquema parece ok.