Business Function Test Scenario Process Definitions
Each of the SAP Readiness Validator business function test scenarios is realized as a separate process definition within the Windchill Enterprise Systems Integration EAI Windchill Simulation module, as listed in the table BusinessWorksProcessDefinitionsin the SAP ReadinessValidator. Each of these process definitions closely imitates the API invocations of the actual Enterprise Systems Integration business logic, but simplifies some of the processing, for example, by not using BAPI_TRANSACTION_ROLLBACK and not re- attempting API invocations upon timeout errors. The "CreateChange Part" process definition, named RV_Part_SAPCreate_PD, is described below as an illustrative example. Refer to the Windchill Enterprise Systems Integration Installation and Configuration Guide and the "SAP API Descriptions/Characterization" section of this document for further details on the SAP API invocation logic of Windchill Enterprise Systems Integration.
Logical Flow
The "Create Part" process definition, named RV_Part_SAPCreate_PD, waits for the required Rendezvous message to trigger its execution. The process then reads in the XML test data input for BAPI_MATERIAL_SAVEREPLICA, invokes the BAPI, and determines whether the invocation was a technical success and a functional success. If an error occurs, the process ends. If there are no errors, the process then repeats the same basic procedure for BAPI_MATERIAL_SAVEREPLICA. Technical and functional successes and failures are logged to the TIBCO BusinessWorks process engine log via inline calls to the shared Logging_Service process. The process definition is illustrated below.
"Create/Change Part" Process Definition, RV_Part_SAPCreateChange_PD
Components
The following chart describes the TIBCO BusinessWorks activities and branching conditions that comprise the "Create/Change Part" process definition, RV_Part_SAPCreateChange_PD.
Activity Name
Input
Output
Dependencies
RVSubscriber_ CreateChangePa rt_Part
Receipt of any Rendezvous message with the subject format: [Domain].Create.Part
None
A Rendezvous message with the required subject format must be received to trigger the start of the process
ReadFile_BAPI_MATERIAL_ SAVEREPLIC A
UTF-8-encoded data file named "BAPI_MATERIAL_SAVEREPLICA.xml" in the path specified by the global variable, ESIValidatorDirectory
Contents of the file as a single, text string
The file exists with UTF-8 encoding
XMLParser_BA PI_MATERIAL_SAVEREPLIC A
The contents of BAPI_MATERIAL_SAVEREPLICA.xml in a single, text string
The contents of BAPI_MATERIA L_SAVEREPLICA.xml in an XML structure
Schema at /SharedConfigu rations/ESISche mas/SAPInterac tionSchemas/B API_MATERI AL_SAVEREPLICA
Invoke_BAPI_ MATERIAL_S AVEREPLICA
The parsed output of BAPI_MATERIAL_SAV EREPLICA.xml
The SAP return structure from executing BAPI_MATERIA L_SAVEREPLIC A
Imported (fetched) structure of BAPI_MATER IAL_SAVEREPLICA in the SAP Part Configuration Adapter Services
CallProcess_Lo gging_Service_ BAPI_MATERI AL_SAVEREPLICA_Technica lSuccess
Required input parameters of the Logging_Service process.
Line appended to BusinessWorks process engine log indicating BAPI_MATERIA L_SAVEREPLIC A technical success
None
CallProcess_Lo gging_Service_ BAPI_MATERI AL_SAVEREPLICA_Technica lFailure
Required input parameters of the Logging_Service process, plus the StackTrace
Line appended to BusinessWorks process engine log indicating BAPI_MATERIA L_SAVEREPLICA technical failure
None
Mapper_BAPI_ MATERIAL_S AVEREPLICA_BAPI_MATE RIAL_SAVEREPLICA_Deter mineSuccess
"ID" and "NUMBER" parameters of return structure of BAPI_MATERIAL_SAV EREPLICA
CreatePartSuccess variable = "true" or "false" depending on contents of return structure of BAPI_MATERIA L_SAVEREPLIC A. Functional success is established if and only if ID="MM" and "NUMBER"=356
BAPI_MATER IAL_SAVERE PLICA invocation was a technical success
CallProcess_Lo gging_Service_ BAPI_MATERI AL_SAVEREPLICA_Function alSuccessFailure
Required input parameters of the Logging_Service process, plus the API return structure fields, TYPE, ID, MESSAGE, and NUMBER. Functional success or failure is indicated by the value of the variable CreatePartSuccess.
Line appended to BusinessWorks process engine log indicating BAPI_MATERIA L_SAVEREPLIC A functional success or failure
CreatePartSucc ess variable must have a value of "true" or "false"
ReadFile_BAPI_TRANSACTI ON_COMMIT
UTF-8-encoded data file named "BAPI_TRANSACTION_COMMIT.xml" in the path specified by the global variable, ESIValidatorDirectory
Contents of the file as a single text string
The file exists with UTF-8 encoding.
XMLParser_BA PI_TRANSACT ION_COMMIT
The contents of BAPI_TRANSACTION_COMMIT.xml in a single, text string
The contents of BAPI_TRANSAC TION_COMMIT.xml in an XML structure
Schema at /SharedConfigu rations/ESISche mas/SAPInterac tionSchemas/B API_TRANSA CTION_COM MIT
Invoke_BAPI_T RANSACTION_COMMIT
The parsed output of BAPI_TRANSACTION_COMMIT.xml
The SAP return structure from executing BAPI_TRANSAC TION_COMMIT
Imported (fetched) structure of BAPI_TRANS ACTION_COMMIT in the SAP Part Configuration Adapter Services
CallProcess_Lo gging_Service_ BAPI_TRANS ACTION_COMMIT_Technical Success
Required input parameters of the Logging_Service process.
Line appended to BusinessWorks process engine log indicating BAPI_TRANSAC TION_COMMIT technical success
None
CallProcess_Lo gging_Service_ BAPI_TRANS ACTION_COMMIT_Technical Failure
Required input parameters of the Logging_Service process, plus the StackTrace
Line appended to BusinessWorks process engine log indicating BAPI_TRANSAC TION_COMMIT technical failure
None
CallProcess_Lo gging_Service_ BAPI_TRANS ACTION_COMMIT_Functional Success
Required input parameters of the Logging_Service process, plus the API return structure fields, TYPE, ID, MESSAGE, and NUMBER.
Line appended to BusinessWorks process engine log indicating BAPI_TRANSAC TION_COMMIT functional success
None
End
None
None
None
Invoke_BAPI_ MATERIAL_S AVEREPLICA
If the BAPI_MATERI AL_SAVEREPL ICA invocation does not encounter a technical error
CallProcess_L ogging_Servic e_BAPI_MAT ERIAL_SAV EREPLICA_TechnicalSuccess
CallProcess_L ogging_Servic e_BAPI_MA TERIAL_SA VEREPLICA_TechnicalFai lure
Branching details are as follows:
Branch From Activity
Condition
If True, Branch To
If False, Branch To
Comment
Invoke_BAPI_ MATERIAL_S AVEREPLICA
If the BAPI_MATERI AL_SAVEREPLICA invocation does not encounter a technical error
CallProcess_L ogging_Servic e_BAPI_MAT ERIAL_SAV EREPLICA_TechnicalSucce ss
CallProcess_L ogging_Servic e_BAPI_MA TERIAL_SA VEREPLICA_TechnicalFai lure
A standard error branch condition automatically detects any technical API invocation errors, such as timeouts
CallProcess_Lo gging_Service_ BAPI_MATER IAL_SAVEREPLICA_Functio nalSuccessFailu re
If CreatePartSucces s = "false"
End
ReadFile_BA PI_TRANSA CTION_COM MIT
Determines whether to continue the process based on the functional success of BAPI_MATE RIAL_SAVE REPLICA
Invoke_BAPI_ TRANSACTIO N_COMMIT_B API_MATERI AL_SAVEREP LICA
If the BAPI_TRANSA CTION_COMMIT invocation does not encounter a technical error
CallProcess_B API_TRANS ACTION_COMMIT_Techni calSuccess
CallProcess_Logging_Servic e_BAPI_TRA NSACTION_ COMMIT_TechnicalFailure
A standard error branch condition automatically detects any technical API invocation errors, such as timeouts
"Create Part" Process Definition Components
這是否有幫助?