Thursday, August 30, 2012

Basic of PLMXML Export/Import

Basic of PLMXML Export/Import
PLMXML is a very powerful tools for importing/exporting data and file from Teamcenter to external system and vice-verse. PLMXML is Siemens PLM sponsors XML schema for exporting/importing metadata as well files from Teamcenter to other system,
  The advantage of PLMXML is its flexibility of defining rule for data extraction and import make it one of the widely use tool for integration and data exchange. It is also widely used in teamcenter other module like report builder and integration. For defining the rules, admin module is present where new rules can be created or modified existing rules. This rules are called Transfermode. In this blog we will discuss in detail the transfermode and its child rules.
Transfer Mode:
Transfermode encapsulate the rules which defines import/export data from teamcenter. It basically govern the Export/Import rules and meta data which required to be extracted from Teamcenter. Transfer mode mainly consist of
·         Closure Rule
·         Filter Rule
·         Property Set

Closure rule: It defines scope of data transfer. Basically it tells how to traverse from target object to its related object and whether to process or skip the object. For example if you are exporting Item Revision and also you required to export attach dataset with specific relation and type, you required to defined this detail in Closure rule.
Closure rule compromises five fields, primary object selector, secondary object selector, relation selector, action, and an optional conditional clause.



Primary object selector is the target object from which the traverse will be defined for its related object which is called secondary object selector. So as in our example for Item Revision to Dataset, Item Revision will become Primary object and Dataset will become secondary object selector as rule will be traverse from Item Revision to Dataset. Primary or Secondary object selector can be either of Buisness Type or Class. The third field relation selection defines how the primary and secondary object are related. Object in teamcenter can be either related through relation, attribute ,property. Other is refby which tell that secondary object refer the primary object. Also there is other two specific to BOM which is occurencetype and content.

Action field tell the system what required to done with secondary object. It take this words.
Skip : The secondary object should not be exported and no further traversing from object is required.

Process: Process the secondary object (extract object), but no further traversing.

Traverse: Don’t process the object (no data extraction), but traverse further for other related object as defined in closure rule.

Alter_closure_rule: Change closure rule for secondary object

Only Skip action can’t be combined will other. Process+Traverse means process the secondary object and traverse further to process its related object.

The closure rule is sequential, means the secondary object will become primary if you want to extract data which is related to secondary object. For example if you want to extract the file of Dataset when Item Revision is exported then we required to define new rule in closure rule which define the traverse rule from dataset to Imanfile.

Property Set: It defines what property can extracted from process object. Closure rule which object required to be process, whereas Property set defined what data/property required to be extracted for those object. By default Teamcenter extracted some set of property for different type of object.  For example revision id for item revision. But user required to extract further information then those required to defined in Property Set and add in transfer mode.
It constitute this following field.
Class or Type : Defined class or type name.
Property or Attribute: Define the attribute required to be exported.
Action: Define whether to process the property or skip.

So for example if we required to extract the description property of Item Revision, it required to be defined as shown in below figure



Filter rules : Filter rules allow a finer level of control over the data that gets translated along with
the primary objects by specifying that a user-written function is called to determine
the filter applied against a given object. Basically it is required for complex scenario where closure rule can be in sufficient to control PLM Data Export/Import. Mainly for condition like if, else if cases and required customization.

Action rule : Action rules are set of method which can be call for before, during, and after the
Translation. Teamcenter provide some of out of box action rule. But client specific cases usually required customization. In TcUA action rule are depreciated and replace by BMIDE extension mechanism