MESAInternational / B2MML-BatchML

B2MML is an XML implementation of the ANSI/ISA-95, Enterprise-Control System Integration, family of standards (ISA-95), known internationally as IEC/ISO 62264. B2MML consists of a set of XML schemas written using the World Wide Web Consortium's XML Schema language (XSD) that implement the data models in the ISA-95 standard.
Other
92 stars 45 forks source link

Work directive attributes missing #66

Closed ArnoClaeys closed 3 years ago

ArnoClaeys commented 4 years ago

The workflow specification and job order id attributes are missing in the work directive object.

Dennis-Brandl commented 3 years ago

There is a JobOrderSourceID that contains the ID of of the job order.
I think I remember discussions that the workflow specification is not needed, because the WorkDirective contains the ID of the Work Master, which contains the Workflow Specification. Can anyone remember if this was the reason that the WorkflowSpecification was not included in the WorkDirective?

erwindl0 commented 3 years ago

I would prefer to have a dedicated association between WorkDirective and WorkflowSpecification, to support the situation where a concrete WorkDirective can contain slight deviations in its WorkflowSpecification, compared to the "template" defined via the WorkMaster.

Dennis-Brandl commented 3 years ago

That is a good point. In that case it would be better to move it to the WorkDefintion because it is common to the WorkMaster and WorkDirective.

erwindl0 commented 3 years ago

Indeed.

Something similar seems the case for JobOrderSourceID?

But I noticed that in WorkMaster it is not optional, while in WorkDirective it is optional (0..1). Personally I would assume that WorkMasters can exist without JobOrders (so JobOrderSourceID should be optional there as well).

A concrete JobOrder may or may not have a WorkDefinition. If it has one, it could be a WorkMaster (if the template is sufficient) or a derived WorkDirective.

So maybe a choice element on JobOrderType to point to either a pair of WorkMasterID/WorkMasterVersion or a WorkDirectiveID/WorkDirectiveVersion could be an option? (and WorkDirective should have not only the WorkMasterID but also the WorkMasterVersion from which it was derived?)

And WorkDefinition could contain an optional JobOrderSourceID?

(disclaimer: I just started learning the details of ISA-95 and B2MML since a year or so, so I may have missed lots of previous discussions/decisions on these topics)

Dennis-Brandl commented 3 years ago

Ok, I took a longer look at this and checked against ISA-95 Part 4.
1) Yes, the WorkMasterType / JobOrderSourceID should be minOccurs="0", 2) Yes, the WorkDirectiveType should have a WorkflowSpecification element with minOccurs="0". 3) Both of these could go into the WorkDefinition because they have the same rules. However, the ISA-95 model shows these as separate relationships under the WorkMaster and WorkDirective. From the B2MML XML viewpoint, it does not matter where they are defined. So in order to keep things simple I recommend we move the JobOrderSourceID and the WorkflowSpecification into the WorkDefinition. This is a breaking change (but there are so many in Version 7, this is minor compared to other changes.) Thoughts?

ArnoClaeys commented 3 years ago

I think this is a good solution. If I’m correct, the WorkflowSpecification was located in the WorkDefinition in Version 6.

As stated by Erwin above, a work directive starts as a copy of a work master. Still, some adjustments in the workflow specification can occur based on the job order requirements (for example product variant or equipment used). Also, in this scenario workflow specification nodes may refer to another work directive.

Many thanks for the effort!

Dennis-Brandl commented 3 years ago

Unless I hear any objections from anyone over the next few days (until Oct 7th). I will commit these changes to the master on the 8th. @ -143,6 +143,10 @@ minOccurs = "0" maxOccurs = "unbounded"/> <xsd:element name = "MaterialSpecification" type = "OpMaterialSpecificationType" minOccurs = "0" maxOccurs = "unbounded"/> <xsd:element name = "JobOrderSourceID" type = "IdentifierType" minOccurs = "0"/> <xsd:element name = "WorkflowSpecification" type = "WorkflowSpecificationType" minOccurs = "0"/> </xsd:sequence> </xsd:group>

@ -150,11 +154,8 @@

__ __ __