Generic Configuration Guide For Teamcenter Based Products - Siemens

Transcription

GenericConfigurationGuide forTeamcenter basedproducts

ContentsPreface5Introduction1-1Concept of Triggering TransferProcess Based Trigger (Workflow) 2-1Continue with Workflow Job despite of a T4x Error Attach Additional Teamcenter Objects to a Workflow and Read their Attributes Attach a Teamcenter form to the current workflow job and read it via the TeamcenterGateway Attach more functionality to a workflow Obtain Detailed Information about the Workflow 2-22-22-22-32-5Ad Hoc Triggers 2-7Menu-based Triggers 2-7Scheduled Triggers 2-8External Query-based Triggers 2-10T4x Export ConceptRelationship: Preference-Mapping-Handler 3-4Generic Preference Concept 3-5Preferences 3-5Blacklist/Whitelist 3-9Generic Mapping Concept 3-11Mapping (Teamcenter data to EA) 3-12How to Read and Write a Teamcenter Preference in the Mapping 3-14Reverse Mapping 3-17Workflow Arguments in the Mapping 3-19Object Transfer 3-21Object Transfer Specific Preferences 3-22Read Data of Object 3-24External Number Assignment 3-28Read Engineering Change Object with different object types and related target objects 3-29Obtain Dataset information 3-31Read Teamcenter Classification Attributes 3-31Structure Transfer 3-32Structure Transfer Specific Handling 3-34Read Data of Structure 3-38Read more than one level of a Teamcenter BOM 3-39Error Handling 3-42Process All Targets or One Transfer Type 3-42Collect All Error Messages for One Transfer Type 3-43Generic Configuration Guide for Teamcenter based products 2018 Siemens Product Lifecycle Management Software, Inc.2

ContentsBranch a Workflow in Case of an Error 3-45Filter Already Transferred Objects 3-48Advanced Configuration 3-50Write an email from T4x 3-51Use of BMIDE Conditions (CLIPS) for Configuration of Rules 3-52How to read properties from a Teamcenter relation 3-53How to change the ID and name of all Teamcenter objects in the current Item Revisionduring a T4x transfer 3-54How to get detailed Teamcenter Release Status information 3-56Set the Teamcenter Release Status effectivity dates 3-56Read and write Teamcenter table properties 3-57Activate ITKco Components 3-59How to ignore read issues during data export 3-60T4x Import ConceptsObject Import 4-4Structure Import 4-5Set a specific Teamcenter UoM 4-7Precise / Imprecise 4-7Import Advanced Configuration 4-8Teamcenter Multi-field Key Functionality 4-9Write to Teamcenter Classification Attributes 4-10Job Processing ConceptConfiguring Job Processing Using Create Jobs on the Job Server Read and Write Job Attributes Job Pool Functions Script on Job Server Job Alerts Job Server Hints and Troubleshooting Cancel a Job and Return SKIPPED Export Job Pool to a File Reset Job Pool Import Job Pool from a File Refresh Job Pool Store, Retrieve or Delete Persistent Data on the BGS ept of Data Federation and Teamcenter GUI ExtensionExternal Queries 6-1Dataview 6-7Widgets On Demand Dataview Refresh Working with Parameters Configure Query Result Object for Dataview 6-136-216-216-23Configuration of Teamcenter GUI Extensions 6-23Runtime Properties 6-28Generic Configuration Guide for Teamcenter based products 2018 Siemens Product Lifecycle Management Software, Inc.3

T4x LoggingCreate T4x error messages Save a session log file info in a way to find it easily Add a file link to a T4x log file Create T4x error messages in the current Teamcenter language Write Custom Log Messages Write to the T4x Workflow logfile Dataset 7-17-27-37-47-57-9Technical ConfigurationTCL Basics TCL Procedures Output Functions Namespaces Variables List Variables Data Arrays Some Important TCL Functions Traps to avoid in TCL Mapping basics Manage a development environment Troubleshooting with Running T4x Processes Setting Up a T4x Command Shell 8-18-18-38-48-58-78-78-78-98-118-178-268-28T4x Workflow HandlerT4x Workflow Handler Overview A-1T4x Workflow Rule Handler Documentation A-4T4x Workflow Action Handler Documentation A-39Glossary4B-1Generic Configuration Guide for Teamcenter based products 2018 Siemens Product Lifecycle Management Software, Inc.

PrefaceThis documentation cannot be used as a substitute for consulting advice, because it can never considerthe individual business processes and configuration. Despite our best efforts it is probable that someinformation about functionality and coherence may be incomplete.Issue: November 2018Legal notice:All rights reserved. No part of this documentation may be copied by any means or made available toentities or persons other than employees of the licensee of the Teamcenter Gateway for SAP BusinessSuite or those that have a legitimate right to use this documentation as part of their assignment onbehalf of the licensee to enable or support usage of the software for use within the boundaries of thelicense agreement. 2002-2018 Siemens Product Lifecycle Management Software Inc.Trademark notice:Siemens, the Siemens logo and SIMATIC IT are registered trademarks of Siemens AG.Camstar and Teamcenter are trademarks or registered trademarks of Siemens Product LifecycleManagement Software Inc. or its subsidiaries in the United States and in other countries.Oracle is a registered trademark of Oracle Corporation.SAP, R/3, SAP S/4HANA , SAP Business Suite and mySAP are trademarks or registered trademarks of SAPor its affiliates in Germany and other countries.TESIS is a registered trademark of TESIS GmbH.All other trademarks, registered trademarks or service marks belong to their respective holders.Generic Configuration Guide for Teamcenter based products 2018 Siemens Product Lifecycle Management Software, Inc.5

6Generic Configuration Guide for Teamcenter based products 2018 Siemens Product Lifecycle Management Software, Inc.

1. IntroductionThe Teamcenter Gateway software solutions are general purpose integration software that provide dataand process integration between Teamcenter by Siemens Product Lifecycle Management Software Inc.and particular target system you want to integrate with.Please note that the Teamcenter Gateway for SAP Business Suite (T4S), the Teamcenter Gateway for SAPS/4HANA (T4S4), the Teamcenter Gateway for Oracle EBS (T4O), the Teamcenter Gateway for CamstarEnterprise Platform (T4CEP), the SIMATIC IT UA DM Gateway for Teamcenter (CLM4T) and theTeamcenter Gateway for Enterprise Applications (T4EA) are available as dedicated products to supportintegration with the SAP Business Suite , the Oracle E-Business Suite, the Camstar Enterprise Platform,SIMATIC IT UA DM and other database enterprise systems, respectively. Each of these products can beused as a single installation or as a combined installation. All of this products provides a wide range ofworkflow functions to transfer and synchronize data between Teamcenter and Enterprise Applications.The main functions cover the following functional areas: Unstructured Teamcenter types or objects (item revisions, datasets) Structured Teamcenter types or structures (bill of materials)You can adapt the individual functions to your requirements by applying specific modifications to thedata mapping process. The steps are described in detail in this manual or the product-specific manuals.For more information on new components and new versions of the products ducts/active-integration/index.shtmlGeneric Configuration Guide for Teamcenter based products 2018 Siemens Product Lifecycle Management Software, Inc.1-1

1. Introduction1-2Generic Configuration Guide for Teamcenter based products 2018 Siemens Product Lifecycle Management Software, Inc.

2. Concept of Triggering TransferT4x is a bidirectional gateway to exchange data between Teamcenter and EA so that you can start thetransfer from Teamcenter or the EA. The way to trigger the data transmission from Teamcenter can bedivided into the following groups: process-based ad hoc2.1 Process Based Trigger (Workflow)A workflow is the automation of business procedures in which documents, information, or tasks arepassed from one participant to another in a way that is governed by rules or procedures. Teamcenterworkflows allow you to manage your product data processes. You can create any type of workflow toaccommodate your business procedures. In T4x context, the workflows are a powerful mechanism totrigger the transfer or import process.Handlers are the lowest-level building blocks in the workflow. They are small ITK programs used toextend and customize tasks. There are two kinds of handlers: Action handlers extend and customize task actions. They perform such actions as displayinginformation, retrieving the results of previous tasks (inherit), notifying users, setting objectprotections and launching applications. Rule handlers integrate workflow business rules into EPM workflow processes at the task level. Theyattach conditions to an action. Rule handlers confirm that a defined rule has been satisfied. If the ruleis met, the handler returns the EPM go command, allowing the task to continue. If the rule is notmet, it returns the EPM nogo command, preventing the task from continuing. Many conditionsdefined by a rule handler are binary (that is, they are either true or false). However, some conditionsare neither true nor false. EPM allows two or more rule handlers to be combined using logical AND/ORconditions. When several rule handlers are combined using a logical Or condition, rule handlerquorums specify the number of rule handlers that must return go for the action to complete.T4x provides this kind of functions for supporting workflows. Please see T4x Workflow Handler to learnmore about this workflow handlers.Please also check this chapters for additional information: Continue with Workflow Job despite of a T4x Error Attach Additional Teamcenter Objects to a Workflow and Read their Attributes Attach a Teamcenter form to the current workflow job and read it via the Teamcenter GatewayGeneric Configuration Guide for Teamcenter based products 2018 Siemens Product Lifecycle Management Software, Inc.2-1

2. Concept of Triggering Transfer Attach more functionality to a workflow Obtain Detailed Information about the Workflow2.1.1 Continue with Workflow Job despite of a T4x ErrorBy default, a workflow job is stopped when an error occurs. In order to prevent that, add the handlerargument -continue on error with the value true. If this is specified in a T4x handler, it will ignoreall Teamcenter Gateway related errors and continue without any error message so that the workflow jobwill run through completely and the Teamcenter Gateway errors can be handled separately. Thehandling of Teamcenter errors (such as "access denied" etc.) is not affected. The feature is available in allstandard transfer action handlers.For telling T4x to not stop until all targets are processed, you can use the handler argument collect all errors.2.1.2 Attach Additional Teamcenter Objects to a Workflow and Read theirAttributesThe mechanism of Attach a Teamcenter form to the current workflow job and read it via theTeamcenter Gateway can also be used to attach several objects other than Forms to the workflow.Although such objects cannot be displayed in the workflow, it may be useful to read their properties inthe mapping. You can add objects (Items, Revisions) that have a GRM relation to any target object of theworkflow.The solution consists of the following steps: Attach the desired related objects to the workflow: add one or more action handlersEPM attach related objects to a workflow task (the root task or the task that contains the T4xtransfer handler). The handlers must have these parameters for a sample case where the target hasan IMAN specification relation to the desired Item: -relation IMAN specification, att type reference, -type ItemRevision. If you need several objects, you can use eitherseveral EPM attach related objects handlers or the LOV feature of this handler, see theTeamcenter documentation. Extend the T4x Transfer handler (e.g. T4x -transfer-BillOfMaterial) in your workflow withargument -AddObject4Mapping and read the desired object attributes in the TCL mapping. Fordetailed description please see T4x Workflow Handler.2.1.3 Attach a Teamcenter form to the current workflow job and read it viathe Teamcenter GatewayBest practice: add a new standard task (not a Do-Task) and fill it in the following way.Note that:2-2Generic Configuration Guide for Teamcenter based products 2018 Siemens Product Lifecycle Management Software, Inc.

Attach more functionality to a workflow Do not leave out the EPM-display-form. Then it will not be possible to switch to the Task View inthe Inbox and therefore the workflow job will not be able to terminate correctly. Do not leave the EPM-hold out. Then the workflow job will break with the error "Instance notlocked. The only mandatory parameter from the screen shot below is the type. The argument should also beused for the handler EPM-display-form. The new form can be saved e.g. as References of the current workflow job. For more possible values,see the Teamcenter help, e.g. TARGET. You can specify initial values for each attribute with the parameter -default. For details, see Teamcenter help for action handler.The handler EPM-display-form is for displaying the form in the workflow before the Done isactivated in the Inbox.To read the Teamcenter form attributes of the current workflow job in the TCL mapping add parameter AddObject4Mapping to the handler that should read the form.For detailed description please see T4x Workflow Handler.Example for the form creation:2.1.4 Attach more functionality to a workflowThe T4x behavior can be changed by setting a Workflow argument that is evaluated in the T4x mapping.Generic Configuration Guide for Teamcenter based products 2018 Siemens Product Lifecycle Management Software, Inc.2-3

2. Concept of Triggering TransferA similar approach is evaluating a Teamcenter Workflow rule handler for setting the result EPM go orEPM nogo, i.e. let the Workflow job go on or stop it at that point. This is done using the T4x mappingfunction callCustomerRuleHandler. It is included in each of the object specific template mappingfiles (i.e. MM, DIR etc., but not LOV ) and is executed in the workflow only if the corresponding objectbased Rule Handler (see below) contains the argument -user rule (not case sensitive; be aware ofthe hyphen). Of course this means that it is only executed in the workflow, not from any interactivefunction. The mapping function checks this argument value and sets the Decision accordingly. Forexample the Material Master mapping template may check the values CHECK DESCRIPTION anyCHECK EXISTS. To activate CHECK EXISTS, set the parameter according to the following screen shot. T4S will call the function callCustomerRuleHandler in the SAP object based rule handlers only(e.g.T4S-validate-DocumentInfoRecord, T4S-validate-MaterialMaster ). Any rule handlerthat works without a specific SAP data object (e.g. T4S-validate-SAPLogon) will not call thisfunction. The function callCustomerRuleHandler that is actually called is always that from the data objectthe current rule handler belongs to, i.e. you may configure this function for MM handling and forBOM handling differently by modifying the function in the corresponding mapping file. Before the function callCustomerRuleHandler is actually executed, the corresponding datamapping is done, so in callCustomerRuleHandler you may evaluate any mapping data you haveset for this object. The behavior of the function callCustomerRuleHandler depends on the return value of themapping function (e.g. for MM mapping: TC Object2SAP MaterialMaster). Only if this returns OK, the function callCustomerRuleHandler is called at all.2-4Generic Configuration Guide for Teamcenter based products 2018 Siemens Product Lifecycle Management Software, Inc.

Obtain Detailed Information about the Workflow If it returns SKIPPED, the Workflow Job will just go on as it immediately gets the value EPM gowithout executing callCustomerRuleHandler. If the mapping return value is ERROR, the Workflow Job is stopped with the stored error message.So if you define an ERROR condition in the mapping and you want to react on that without stopping theworkflow job, you have to store a global variable for your error and exit the mapping function with OKnevertheless; then you can evaluate your variable in callCustomerRuleHandler.For example, to include the T4S-validate-ChangeNumber (which checks a SAP ECM) in the MMworkflow the handler should be added with the argument -user rule and value CHECK EXISTS.To change the functionality the function callCustomerRuleHandler from the ECM mapping file hasto be modified.The rule handler T4X-attach-LogfileDataset is included in each standard T4x workflow templateand it does not need an argument. The purpose of this rule handler is attaching a log file to eachworkflow.After the workflow has finished, the attached file can be found as follows: Select the Item Revision in "My Teamcenter". Right-click the Item Revision and select "Send to". Select the application "Workflow Viewer". In the "Workflow Viewer" click the icon "Attachments" ( in the lower left corner). Double-click the Dataset T4x -Logfile to view the content of the log file.2.1.5 Obtain Detailed Information about the WorkflowThe Obtain Info from WF - t4x triggering get info form wf doc.sd shows how toobtain additional information about the current workflow. Note that: Some information may exist more than once so it has to be asked with a counter, e.g. the zeroin ::TcData(Workflow:ReleaseStatus:0) for the first one in the list (second one is :1 etc.). Besure to set the counter according to your requirements; maybe you have to use a loop to determinethe latest one. For the example with the Workflow Job release status (which is not the same as arelease status of a Workflow target) it should not be a problem because you know from the Workflowdesign in which order the statuses have been attached to the Workflow Job. The last mod user of the Workflow Job is the last Teamcenter user doing anything during thisWorkflow job, e.g. a Reviewer or an automatic user for the T4x job functionality.Generic Configuration Guide for Teamcenter based products 2018 Siemens Product Lifecycle Management Software, Inc.2-5

2. Concept of Triggering TransferFor workflow transactions T4x provides the following way to get the owning user and theowning group of the executed workflow:if {[info exists ::TcData(WorkflowJob:owning user)]} {set OwningUser [tpco formatHEX16 ::TcData(WorkflowJob:owning user)]}if {[info exists ::TcData(WorkflowJob:owning group)]} {set OwningGroup [tpco formatHEX16 ::TcData(WorkflowJob:owning group)]}T4x may read "Personal Attributes" of the owing user of the workflow, too, as they are the stored in theorganization hierarchy of the Teamcenter database (Administration Organization):if {[info exists ::TcData(WorkflowJob:owning user:PersonName)]} {set OwningPerson \[tpco formatHEX16 ::TcData(WorkflowJob:owning user:PersonName)]}if {[info exists ::TcData(WorkflowJob:owning user:PersonAttribute:PA1)]}{set PA1 \[tpco formatHEX16 ::TcData(WorkflowJob:owning user:PersonAttribute:PA1)]}if {[infoexists ::TcData(WorkflowJob:owning user:PersonAttribute:PA11)]} {set PA11 \[tpco formatHEX16 ::TcData(WorkflowJob:owning user:PersonAttribute:PA11)]}The owning user from code example above of a workflow job means the Teamcenter user whoinitiated the workflow job. The last mod user of the Workflow Job is the last Teamcenter user doinganything during this workflow job, e.g. a Reviewer or an automatic user for the T4x job functionality.2-6Generic Configuration Guide for Teamcenter based products 2018 Siemens Product Lifecycle Management Software, Inc.

Ad Hoc TriggersCaution: The T4x mapping can check the current workflow task name, but not the handler name! If it seems that a T4x workflow handler did nothing in a workflow job because there was novalid target in the current workflow job (e.g. the T4x document handling is configured forstandard ItemRevs only, but a ‘MyItemRevision’ was selected as the workflow target), this maybe not obvious at once, because T4x will not write a transaction log for that processing. It may be checked with the workflow log file Dataset attachment (by the rule handler T4Xattach-LogfileDataset): If the target is correct, the workflow log file shows e.g. (12345 is the Item ID): T4x -transfer-DocumentInfoRecord: returns for Action:Complete CREATED T4x -transfer-DocumentInfoRecord: process MSWord object:12345/A T4x -transfer-DocumentInfoRecord: returns for Action:Complete UPDATED. If there is no correct target, then the line with the Item ID is missing, so in case of a problemthat is the easiest way to check if T4x processed the object at all.2.2 Ad Hoc TriggersAs an interactive user you can use the following ad hoc triggers to start the T4x transfer: Menu-based Triggers Scheduled Triggers External Query-based Triggers2.2.1 Menu-based TriggersThe T4x menu is included into the Teamcenter Rich Client by a new menu. In order to use T4x, selectyour desired object and click on the appropriate menu entry.If you do not select anything or select an object that has been not configured, the functions in the submenu (Display, Create ) are grayed out and therefore not selectable.Generic Configuration Guide for Teamcenter based products 2018 Siemens Product Lifecycle Management Software, Inc.2-7

2. Concept of Triggering TransferBy using the Teamcenter standard functionality for customizing the Teamcenter icon bar, it is alsopossible to start T4x transactions without opening any menu:After you have selected one or more objects (in most cases an Item Revision) and an appropriate T4xfunction, the "T4x Transfer Window" opens. Depending on the object(s) and their data, additionalinformation may be displayed in the windowAll the data you can see in the "T4x Transfer Window" is not stored anyhow in T4x; the "T4x TransferWindow" only shows data stored in Teamcenter. You may notice that attributes are revealed on gray oron white background: Data shown with a gray background may only be displayed. The data in the form which are not locked can be modified during runtime. If you modify such anattribute, T4x stores the modification into the appropriate object and only then start the transaction.Caution:With forms that may be modified this way: To avoid transferring failure caused with access rights, do not use the write-protected rules forthe form. T4x checks the input as soon as you click any button. If the form cannot be saved because ofwrong data type or exceeding length, T4x does not send the data to EA and display thecorresponding error message.T4x shows any attribute empty that does not contain a value in Teamcenter. If the form itself does notexist, T4x does not display the attribute at all.Learn more about how to configure and use the Gateway Menu using the preferences in theTeamcenter Gateway - RAC GUI Preference Example Collection.2.2.2 Scheduled TriggersThe Z-Table is a transparent table in the EA database which is used to store information about certain EAobjects which are changed by users interactively, by workflow or by using external software. As soon asan object is saved in EA one line is added to the Z-Table with its corresponding information. In this sensethe Z-Table is a staging area within EA from where T4x picks up jobs to update Teamcenter data. Withinthe table T4x maintains the transfer status for each of the objects. By the table, the T4x grabs the storedinformation by polling against it within a defined period. It checks then if there are new entries in thetable. If so, each new entry is read by T4x and an action is triggered like creating or updating acorresponding object/item in Teamcenter. After this, a status is written back to the table so that the linewill not be processed again.Please note that:2-8Generic Configuration Guide for Teamcenter based products 2018 Siemens Product Lifecycle Management Software, Inc.

Scheduled Triggers EA event triggers transfer by creating an entry in custom EA staging Z-Table. EA scheduled trigger reads the entry and creates a job. The job is executed (as defined in mapping file): Read EA data. Find related TC object. Update / Create TC object. Update TC attributes. Additional actions like set status, trigger a TC workflow, send an email. Update entry in Z-Table (store information about status transaction's status e.g. S, Q or E). The Job status indicates success or failure of import.For running the script, please set the following parameters: Mode: Specify if the script should search for new entries only once (single) or in regular timeintervals (loop). Interval in milliseconds: If you selected mode "loop", set the required time interval. Used Job template: Select one of the listed job product specific templates Z-Table Object Type (optional): If you are using the T4x database trigger templates as defined, youdo not need to specify anything here. Only if using different object types (Z-Table field OBJECT TYP)in your custom database triggers, set this parameter here. AdditionalInfo for Job(optional)1You can run this script on demand from web front-end or as scheduled script. If you run it as a scheduledscript, make sure that the default input parameters match your needs.The example under T4x ROOT /var/test/Jobs/trigger EA zjob scheduler.tcl2 gives you a ready to useTask Management script that allows you to check the Z-Table and create needed jobs for found entries.Please adapt and test your script in the T4x test environment, configure it to run every x minutes. Itdepends on how often it is necessary to update the Teamcenter environment. This script checks the Z-12T4S onlyT4S and T4O onlyGeneric Configuration Guide for Teamcenter based products 2018 Siemens Product Lifecycle Management Software, Inc.2-9

2. Concept of Triggering TransferTable for new entries only. To change this behavior, modify its parameters to fit all requirements youneed. See more details on how to create a task to run the script in the GS Admin UI online help.2.2.3 External Query-based TriggersTo start the import of the object (learn more about External Queries), i.e. create a correspondingTeamcenter object (or update it if it exists already), right-click the selected line in the Teamcenter searchresult and select "Import Object to Teamcenter". This triggers the row query again and starts a T4x jobfor the import. For details about T4x jobs, see Job Processing Concept2-10Generic Configuration Guide for Teamcenter based products 2018 Siemens Product Lifecycle Management Software, Inc.

3. T4x Export ConceptPerhaps the simplest, but also the most common integration is to transfer data resulting from anengineering process in Teamcenter to the EA, e.g. an ERP system. This kind of transport is called exportor transfer in the

1. Introduction The Teamcenter Gateway software solutions are general purpose integration software that provide data and process integration between Teamcenter by Siemens Product Lifecycle Management Software Inc.