任务 4:如何配置构造消息形状
构造消息将消息赋值与 Begin、Edit 和 End Doc 代码的指令保存在一起。
使用以下过程配置构造消息形状。
配置“构造消息”形状
在 ReceiveBeginDoc 和 SendBeginDoc 之间拖动构造消息形状。
构造的消息: BeginDocSessionMsg
名字: ConstructBeginDocMessageWithSession
将消息赋值形状拖入要在其中创建新消息的业务流程中。
双击内部 MessageAssignment_1 形状。
随即将显示 BizTalk 表达式编辑器。
键入代码,例如:
BeginDocSessionMsg = BeginDocMsg; BeginDocSessionMsg(JDE.ReserveSession) = true; BeginDocSessionMsg(JDE.SessionID) = 0;
此操作将告知适配器您要启动一个会话。 SessionID 初始化为 0,但当响应返回时,ID 将由 J.D. Edwards EnterpriseOne 服务器分配。
将构造消息拖至 SendEditLine 之前。
构造的消息: EditLineSessionMsg
名字: ConstructEditLineMessageWithSession
将消息赋值形状拖入要在其中创建新消息的业务流程中。
双击内部 MessageAssignment_1 形状。
随即将显示 BizTalk 表达式编辑器。
键入代码,例如:
EditLineSessionMsg = EditLineMsg; EditLineSessionMsg(JDE.ReserveSession) = true; EditLineSessionMsg(JDE.SessionID) = BeginDocResponseMsg(JDE.SessionID);
将构造消息形状拖至 SendEndDoc 之前。
构造的消息: EndDocSessionMsg
名字: ConstructEndDocMessageWithSession
将消息赋值形状拖入要在其中创建新消息的业务流程中。
双击内部 MessageAssignment_1 形状。
随即将显示 BizTalk 表达式编辑器。
键入代码,例如:
EndDocSessionMsg = EndDocMsg; EndDocSessionMsg(JDE.ReserveSession) = false; EndDocSessionMsg(JDE.SessionID) = BeginDocResponseMsg(JDE.SessionID);