Advanced Service Connect9

Download as pdf or txt
Download as pdf or txt
You are on page 1of 64

Epicor ERP Advanced Epicor Service Connect 9.

05 for Epicor ERP Course


9.05.606

Disclaimer
This document is for informational purposes only and is subject to change without notice. This document and its contents, including the viewpoints, dates and functional content expressed herein are believed to be accurate as of its date of publication. However, Epicor Software Corporation makes no guarantee, representations or warranties with regard to the enclosed information and specifically disclaims any applicable implied warranties, such as fitness for a particular purpose, merchantability, satisfactory quality or reasonable skill and care. As each user of Epicor software is likely to be unique in their requirements in the use of such software and their business processes, users of this document are always advised to discuss the content of this document with their Epicor account manager. All information contained herein is subject to change without notice and changes to this document since printing and other important information about the software product are made or published in release notes, and you are urged to obtain the current release notes for the software product. We welcome user comments and reserve the right to revise this publication and/or make improvements or changes to the products or programs described in this publication at any time, without notice. The usage of any Epicor software shall be pursuant to an Epicor end user license agreement and the performance of any consulting services by Epicor personnel shall be pursuant to Epicor's standard services terms and conditions. Usage of the solution(s) described in this document with other Epicor software or third party products may require the purchase of licenses for such other products. Where any software is expressed to be compliant with local laws or requirements in this document, such compliance is not a warranty and is based solely on Epicor's current understanding of such laws and requirements. All laws and requirements are subject to varying interpretations as well as to change and accordingly Epicor cannot guarantee that the software will be compliant and up to date with such changes. All statements of platform and product compatibility in this document shall be considered individually in relation to the products referred to in the relevant statement, i.e., where any Epicor software is stated to be compatible with one product and also stated to be compatible with another product, it should not be interpreted that such Epicor software is compatible with both of the products running at the same time on the same platform or environment. Additionally platform or product compatibility may require the application of Epicor or third-party updates, patches and/or service packs and Epicor has no responsibility for compatibility issues which may be caused by updates, patches and/or service packs released by third parties after the date of publication of this document. Epicor is a registered trademark and/or trademark of Epicor Software Corporation in the United States, certain other countries and/or the EU. All other trademarks mentioned are the property of their respective owners. Copyright Epicor Software Corporation 2011. All rights reserved. No part of this publication may be reproduced in any form without the prior written consent of Epicor Software Corporation.

ED902905 90521-905-8799-583606 9.05.606 Revision: July 13, 2011 9:39 a.m. Total pages: 64 course.ditaval

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Contents

Contents
Advanced Epicor Service Connect 9.05 for Epicor ERP Course............................................6 Before You Begin....................................................................................................................7
Audience.........................................................................................................................................................7 Prerequisites....................................................................................................................................................7 Environment Setup..........................................................................................................................................7 Workshop Constraints..............................................................................................................................9

Overview...............................................................................................................................10
Epicor Service Connect Solutions....................................................................................................................10 Epicor Service Connect Installation.................................................................................................................10 IIS Server Status......................................................................................................................................10 Licensed Functionalities...........................................................................................................................11 Task Service Properties............................................................................................................................11 Document Tracking Properties................................................................................................................11 DES Service Properties.............................................................................................................................12 .NET Call Performance............................................................................................................................12 Communication Manager Property.........................................................................................................12 Mass Update of Workflows.....................................................................................................................12 Web Methods to .NET Calls Converter....................................................................................................13

Process...................................................................................................................................14
Test .NET References......................................................................................................................................14 Workshop - Test a .NET Reference..........................................................................................................14 Import a .NET Reference..................................................................................................................14 Test a .NET Method.........................................................................................................................15 Web Service Enhancements 3.0 Server Policy..................................................................................................16 Workshop - Apply WSE 3.0 Server Policy.................................................................................................16 Install Services.................................................................................................................................16 Create a Configuration File..............................................................................................................17 Apply WSE 3.0 Server Policy............................................................................................................18 Test the Part Service........................................................................................................................19 Database Operations......................................................................................................................................21 Workshop - Create a Workflow..............................................................................................................21 Create a CSV File.............................................................................................................................21 Add a Sender..................................................................................................................................22 Add a Message Type.......................................................................................................................22 Add an Input Channel.....................................................................................................................22 Generate a Schema.........................................................................................................................23 Create a Workflow..........................................................................................................................24 Define the Conversion.....................................................................................................................24 Edit the Conversion.........................................................................................................................25 Define a .NET Call............................................................................................................................26

Epicor ERP | 9.05.606

Contents

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Add a Message Map........................................................................................................................26 Run the Workflow...........................................................................................................................27 Verify the Results.............................................................................................................................27 Workshop - Use a Database Operation...................................................................................................27 Add an Output Channel..................................................................................................................27 Modify the Workflow......................................................................................................................28 Define the DBOperation..................................................................................................................28 Build the Statement.........................................................................................................................30 Define the Poster.............................................................................................................................31 Modify the CSV File.........................................................................................................................31 Run the Workflow...........................................................................................................................31 Verify the Results.............................................................................................................................31 Workshop - Use the Database Lookup Functoid......................................................................................32 Modify the Conversion Element.......................................................................................................32 Create a Query................................................................................................................................33 Create a Where Expression..............................................................................................................33 Run the Workflow...........................................................................................................................34 Verify the Results.............................................................................................................................35 Channel Info Tag...........................................................................................................................................35 Workshop - Expose the Channel Info Tag...............................................................................................35 Create a Message Extension............................................................................................................35 Modify the Conversion Element.......................................................................................................36 Modify the Output Channel.............................................................................................................37 Run the Workflow...........................................................................................................................37 Verify the Results.............................................................................................................................37 Batch Execution.............................................................................................................................................38 Workshop - Test Batch Execution of Sub-Workflows...............................................................................38 Download Files................................................................................................................................38 Restore Connectivity Settings...........................................................................................................39 Re-import the Service Reference......................................................................................................40 Prepare the Workflow.....................................................................................................................40 Enable Channels..............................................................................................................................41 Trigger the Workflow......................................................................................................................41 Verify the Results.............................................................................................................................42 Enable a Batch Execution.................................................................................................................42 Trigger the Workflow......................................................................................................................43 Verify the Results.............................................................................................................................43 Break Cycle....................................................................................................................................................43 Workshop - Break a Cycled Sub-Workflow..............................................................................................44 Disable Batch Execution...................................................................................................................44 Modify a Sub-Workflow..................................................................................................................44 Edit the Choice Item........................................................................................................................45 Configure the First Connection........................................................................................................45 Configure the Second Connection...................................................................................................46 Run the Workflow...........................................................................................................................47

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Contents

Edit the Break Cycle Conversion......................................................................................................48 Run the Workflow...........................................................................................................................48 Service Connect and Business Process Management.......................................................................................50 Workshop - Create Demand...................................................................................................................50 Create a Demand Contract..............................................................................................................50 Create New Demand.......................................................................................................................51 Explore Business Objects..................................................................................................................51 Workshop - Create the Workflow...........................................................................................................53 Add a Service Reference..................................................................................................................53 Create the Workflow.......................................................................................................................53 Edit the First Conversion..................................................................................................................54 Edit the First Web Method...............................................................................................................55 Edit the Second Conversion.............................................................................................................55 Modify the Demand Record.............................................................................................................56 Edit the Second Web Method..........................................................................................................57 Workshop - Create a Method Directive...................................................................................................58 Add a Method Code........................................................................................................................58 Add a Pre-Processing Directive.........................................................................................................58 Add a Condition..............................................................................................................................58 Add an Action.................................................................................................................................59 Workshop - Test BPM Execution.............................................................................................................60 Modify Part Information..................................................................................................................60 Test the Result.................................................................................................................................60 Customized View...........................................................................................................................................61 Workshop - Create a Customized View...................................................................................................61 Create a View..................................................................................................................................61 Apply a Filter...................................................................................................................................62

Conclusion.............................................................................................................................63

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Advanced Epicor Service Connect 9.05 for Epicor ERP Course


This course focuses on the advanced features of Epicor Service Connect and how to integrate it with the Epicor application. Service Connect supports specific collaborative processes, connecting different business entities, applications, or users. Service Connect uses open, industry wide standards and technology that enables businesses to deploy solutions now, confident their investment will remain mainstream for the foreseeable future. Service Connect harnesses the power of XML, electronic message transfer, and processing environments to deliver reliability combined with ease of use. Service Connect supports a rich workflow environment where users can link individual workflows to business events, run Service Connect business logic, or interact with other users through a task list, e-mail, and so on. Workflow Designer is an integrated environment for creating new workflows or inserting new business logic units into existing workflows to tailor them to customer needs. In Workflow Designer, the user can customize a workflow graphically with drag-and-drop functionality or point-and-click technology. Upon successful completion of this course you will be able to: Import and test .NET assembly references. Apply WSE 3.0 server policy. Perform advanced database operations. Access channel information in a workflow. Restore connectivity settings. Execute synchronous sub-workflows in batches to test system performance. Break sub-workflow execution. Use Business Logic Tester to explore a business object. Use Business Process Management to call Epicor Service Connect workflow. Create a customized view in Document Tracking.

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Before You Begin

Before You Begin


Read this topic for information you should know in order to successfully complete this course.

Audience
Specific audiences will benefit from this course. Engineer System Administrator IT/Technical Staff

Prerequisites
In order to complete the workshops in this course, all necessary modules must be licensed and operating in your training environment. For more information on the modules available, contact your Epicor Customer Account Manager [email protected]. It is also important that you understand the prerequisite knowledge contained in other valuable courses. Navigation Course - This course introduces navigational aspects of the Epicor application's user interface. Designed for a hands-on environment, general navigation principles and techniques are available at each of the interface levels in the Epicor application - system, module, and program. Workshops focus on each of these levels and guide you through each navigational principle introduced. Database Concepts Course - This course reviews the table and field name identification process using Field Help, Customization Tools, and the Data Dictionary Viewer functionality. It also describes table linking procedures and requirements, Dataset Relationships Tracker features, and join type definitions and specifications. Business Process Management Course - This course focuses on the Business Process Management. BPM allows you to modify the flow of business processes through the application. This allows individual companies to tailor the business flow to their specific requirements. Epicor Service Connect 9.05 for Epicor 9 Course - This course focuses on the main features of Epicor Service Connect and how to integrate it with the Epicor application. Service Connect is a powerful development tool that allows you to build workflows which can automate processes within an application or connect different business entities, applications, or users. It harnesses the power of XML and other open standards.

Environment Setup
The environment setup steps and potential workshop constraints must be reviewed in order to successfully complete the workshops in this course. Your Epicor training environment, in which the Epicor demonstration database is found, enables you to experience Epicor functionality in action but does not affect data in your live, production environment. The following steps must be taken to successfully complete the workshops in this course.

Epicor ERP | 9.05.606

Before You Begin

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

1.

Verify the following or ask your system administrator to verify for you: Your Epicor training icon (or web address if you are using Epicor Web Access) points to your Epicor training environment with the Epicor demonstration database installed. Do not complete the course workshops in your live, production environment. Note It is recommended that multiple Epicor demonstration databases are installed. Contact Support or Systems Consulting for billable assistance. The Epicor demonstration database is at the same service pack and patch as the Epicor application. Epicor's education team updates the Epicor demonstration database for each service pack and patch. If your system administrator upgrades your Epicor application to a new service pack or patch, he or she must also download the corresponding Epicor demonstration database from EPICweb > Support > Epicor > Downloads and install it. If this is not performed, unexpected results can occur when completing the course workshops. Your system administrator restored (refreshed) the Epicor demonstration database prior to starting this course. The Epicor demonstration database comes standard with parts, customers, sales orders, and so on, already defined. If the Epicor demonstration database is shared with multiple users (that is, the database is located on a server and users access the same data, much like your live, production environment) and is not periodically refreshed, unexpected results can occur. For example, if a course workshop requires you to ship a sales order that came standard in the Epicor demonstration database, but a different user already completed this workshop and the Epicor demonstration database was not restored (refreshed), then you will not be able to ship the sales order. Epicor's education team has written the course workshops to minimize situations like this from occurring, but Epicor cannot prevent users from manipulating the data in your installation of the Epicor demonstration database.

2.

Log in to the training environment using the credentials manager/manager. If you are logged in to your training environment as a different user, from the Options menu, select Change User. From the Main menu, select the company Epicor Education (EPIC06). From the Main menu, select the Main Plant. Epicor Service Connect 9.05 must be installed in your environment. To perform the Workshop - Apply WSE 3.0 Server Policy, Web Services Enhancements (WSE) 3.0 (Administrator mode) must be installed. To perform the Workshop - Use Database Operation, ODBC driver to your Epicor application must be established. Example Microsoft OLE DB Provider for ODBC Drivers or Microsoft OLE DB Provider for SQL Server.

3. 4. 5. 6.

7.

8.

To perform the Workshop - Call Service Connect Using Business Process Management, Business Layer Tester must be installed in your environment. To locate the installer of this tool, navigate to the Utilities folder of your Epicor 905 installation, for example c:\Program Files\epicor\Epicor905\Utilities\BL-Tester. For more information, contact your system administrator.

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Before You Begin

Workshop Constraints
The following workshops or topics should only be performed once in your Epicor Service Connect environment. Workshop - Test a .NET Reference - Import a .NET Reference Workshop - Apply WSE 3.0 Server Policy Workshop - Test Batch Execution of Sub-Workflows Workshop - Break a Cycled Sub-Workflow Workshop - Create a Method Directive

Epicor ERP | 9.05.606

Overview

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Overview
The Epicor Service Connect environment consists of various server files, tools, and Windows services that are managed, for the most part, by a Microsoft Management Console (MMC) snap-in called the Epicor Service Connect Administration Console. The Service Connect design environment consists of an application called the Workflow Designer that allows users to create and modify workflows. The Service Connect server can be on a different machine than the applications with which it interacts, or it can be on the same machine.

Epicor Service Connect Solutions


This topic discusses main components and terms that apply to the Service Connect solution. The main features include: Documents - Made available from an application, these are XML files, CSV files, or Microsoft Excel files. Other formats are supported with the use of custom conversion plug-ins. All incoming documents are converted to a standard XML format referred to as the internal envelope. The parts of an XML document are referred to as nodes. Web Services - These are software components designed to support interoperable machine-to-machine interaction over a network. .NET References - These references allow you to call .NET object methods inside workflows. Database Operations - These workflow elements allow you to perform application database transactions. Channels - These are configured in the Epicor Service Connect Administration Console to receive documents from an application and optionally send documents to other applications. Channels that receive documents are referred to as input channels and channels that send documents are referred to as output channels. Message Maps - These route incoming documents to the appropriate workflow. Workflows - These orchestrate automated processes. Workflows manipulate documents to pass along data to another application, either by calling out to another application in the middle of the workflow or by producing a new document at the end of the workflow. A workflow is represented in the Workflow Designer as a diagram that consists of various activities. Each activity performs a specific operation, such as transforming a document to a new format or calling a web service to obtain information.

Epicor Service Connect Installation


The following topics present useful tips on how to verify your Epicor Service Connect installation and how to perform some of the maintenance tasks.

IIS Server Status


This topic discusses how to verify your Internet Information Services (IIS) server status. Microsoft IIS 6.0 (or later) is a software prerequisite for an Epicor Service Connect installation. Before you start to work with Epicor Service Connect (ESC), you need to ensure that IIS server is up and running, ESC host is

10

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Overview

resolved into the IP address of your Service Connect server, and an internet connection is configured properly to validate .xml schemas. The hosts file is a plain text file an operating system uses to map to IP addresses. In Microsoft Windows environments, the file is located in the %SystemRoot%\system32\drivers\etc\ folder. In the following example, scshost is resolved to the local IP address. 127.0.0.1 127.0.0.1 localhost scshost

During the Task Monitor installation, 'http://scshost' is added to Local Intranet sites. In Internet Information Services (IIS) Server Manager, navigate to the Sites node and verify the host site is running. You can access this feature from the Start > Administrative Tools menu. Within the scshost site, navigate to the Schemas node, right-click any schema, and select Browse. If any proxy server is used in your environment, you must select Bypass proxy server for local addresses option for the correct schema resolution. In the Microsoft Internet Explorer environment, use the Tools > Internet Options > Connection Settings > LAN settings > Proxy server section to access this option.

Licensed Functionalities
Before you start to use Epicor Service Connect, verify your license is valid and view the list of all licensed functionalities. In Epicor Service Connect Admin Console, navigate to the Licenses > Features node to view licensed Business and System functionalities and their license file. In the Value field, the True value confirms you can use the functionality or a number displays the amount of users allowed to work with the functionality. To view the identification number of the license file and the directory where it is located, right-click any folder in the Licences node and select Properties.

Task Service Properties


Task Service controls and manages Tasks a workflow process executes. The service performs the following functions: Searches for Tasks, completed in Task Monitor by decision makers Searches for expired active Tasks Searches for expired completed Tasks To modify service settings, in Epicor Service Connect Admin Console, right-click the Tasks node and select Properties. In the Task Properties window, modify settings in the General and Archiving sections, for example, modify an Update period. Correct setup helps you avoid delays when you work with Task Monitor and Task service components.

Document Tracking Properties


Use the Document Tracking Properties window to set up database, view, and archiving options. To access this window, in Epicor Service Connect Admin Console, right-click the Document Tracking node and select Properties. On the General sheet, set up the server name and the database. Use the View options to specify the maximum number activities that display, and the maximum number of traces that display for each activity's progress. On the Database Cleanup sheet, decide whether to enable archiving and set up the available options.

Epicor ERP | 9.05.606

11

Overview

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

DES Service Properties


To configure Data Exchange Server Service properties, in the Epicor Service Connect Administration Console tree, right-click the Connectivity node and select Properties. In the DES Service Properties window, select the SQL Server name and Database name. In the Threads count field, enter the maximum number of threads that can be used to batch process synchronous subworkflow iterations. The new value is applied after the services restart.

.NET Call Performance


To optimize .NET call performance, in Epicor Administration Console, right-click the Connectivity > .NET References node and select Properties. The Cache Epicor sessions option defines whether to use a single instance of the Epicor.Mfg.Core.Session object .NET reference calls with the same credentials and AppServer. The more Epicor .NET calls your system performs, the more tangible is the effect of this setting. The setting changes will be applied only after services restart. Tip You can restart all SC Services. To restart all SC Services, right-click the SC Service Manager icon in the system tray and select the corresponding option. You can access this option from the Start menu, for example, Start > All Programs > Epicor Software > Epicor Service Connect > SC Service Manager.

Communication Manager Property


To set a maximum number of threads for a server, in Epicor Administration Console, right-click the Connectivity > Communication Setup > your server name > Channels node and select Properties. The Maximum threads count field displays the number of concurrently picked up messages in the Messenger service. Tip Select the Number of Messenger threads based on the number of channels and their sequential property. The maximum thread count should be set to at least the number of channels marked as High-loaded + number of all the rest sequential channels + 1..3. If there are slow channels, such as POP3 or SMTP in the system, the number of threads should increase. Three threads is a good starting value.

Mass Update of Workflows


Use the Mass Update feature to implement a change in multiple processes. The following is a list of possible cases when you need to perform a mass update: If the e-mail address of a system administrator changes, all SMTP Posters should be re-configured to send error notifications to the new address. You need to add a new user or group to the list of users for processing tasks. You need to change service references names. With Mass Update you can modify a number of properties for multiple Task, Poster, Web Reference, or .NET Calls. To access this feature, in the Connectivity node, right-click the Workflow packages node and select Update Processes. Use the wizard to implement desired changes.

12

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Overview

Web Methods to .NET Calls Converter


Use the Web2Net utility to convert Web Methods within workflows to .NET Calls. Web2Net Converter is a part of the standard Service Connect installation package. To access the converter, use the following path: Start menu > All Programs > Epicor Software > Epicor Service Connect > Web2NETConverter. Before you run the process on the Service Connect server, import the .NET references to replace the Web Methods. Ensure the .NET references have exactly the same names as the Web Methods. The Web2NET Converter creates a new workflow package named <SourceWorkflowPackage>_converted. The resulting converted workflow is located within this workflow package and has the same name as the source workflow.

Epicor ERP | 9.05.606

13

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process
This section reviews advanced Service Connect techniques and contains workshops that guide you through the process.

Test .NET References


.NET Call allows you to use the standard workflow designer engine to call any method of any .NET object registered in a workflow. This feature allows you to extend the scope of the functionality within the workflows and to create the functionality in any .NET language. Before you use the .NET Call inside a workflow, use ESC Administration Console to add a .NET reference. After you add a .NET reference, you can perform a connectivity check of the .NET reference and the assembly's methods.

Workshop - Test a .NET Reference


The following workshop demonstrates how to import a part .NET reference and test whether a part already exists in a database.

Import a .NET Reference


Navigate to Epicor Service Connect Administration Console. Start > All Programs > Epicor Software > Epicor Service Connect > Service Connect Administration Console Note The path may vary in your environment.

1. Navigate to Connectivity > .NET References. 2. Right-click .NET References and select Add Reference. The Add .NET reference wizard displays. 3. Click Next. 4. Next to the Assembly path field, click the ... (browse) button. The Select Assembly window displays. 5. Navigate to the client folder on the server, for example C:\Epicor\Epicor905\client Note Contact your system administrator for help, if necessary.

6. In the Reference name field, enter PartUpdate. 7. In the File type field, select Epicor .NET Assemblies (Epicor.Mfg.BO.*.dll). 8. In the Select Assembly window, select Epicor.Mfg.BO.Part.dll and click OK. This is the business object that holds parts information.

14

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

9. In the Add .NET Reference window, in the Assembly type field, select Epicor assembly. 10. In the Add .NET Reference window, click Next. The Logon to Epicor section displays. 11. Enter the following information: Field AppServer Port User Password Company Plant Data Enter your server name. Enter your application port number, for example, 9001. Enter a valid user, for example, manager. Enter a valid password for the user, for example, manager. Enter a company, for example, EPIC06. Enter a plant name, for example, MfgSys.

12. In the Add .NET Reference window, click Next. 13. Verify the information and click Next. The import process begins and may take a while. 14. Once the All methods of .NET assembly are imported information displays, click Next. 15. In the Add .NET Reference window, view the information and click Finish.

Test a .NET Method


After you add a .NET reference, you can perform a connectivity check of the .NET reference and the assembly's methods. 1. In the Console tree, in the .NET References node, click the PartUpdate reference. The list of methods displays in the right pane. 2. In the list, right-click the PartUpdate.Epicor.Mfg.BO.Part.PartExists method and select Test. The Test Method window displays. You can use the Xml sheet or the Text sheet to compile your method request. 3. Verify the Xml sheet displays. 4. In the CompanyID field, enter your company ID, for example, EPIC06. 5. In the partNumber field, enter DSS-1010. 6. Click Test. The msg:description Operation completed successfully displays. 7. The result node displays true, which means the part exists in the database. Tip If you are testing Epicor BO call, select the Insert Call Context check box to display the call context information.

Epicor ERP | 9.05.606

15

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

8. Click Close.

Web Service Enhancements 3.0 Server Policy


The Web Services Enhancements (WSE) 3.0 for Microsoft .NET is an add-on to Microsoft Visual Studio 2005 and the Microsoft .NET Framework 2.0 that enables developers to build secure Web services based on the latest Web services protocol specifications. Epicor Service Connect supports WSE 3.0 server policies.

Workshop - Apply WSE 3.0 Server Policy


In the following workshop, use the Microsoft WSE 3.0 Configuration Tool to create a new policy configuration file. Apply the new policy while importing a new web service reference. Important To complete the workshop, Web Services Enhancements (WSE) 3.0 for Microsoft .NET must be installed on your Epicor Service Connect Server.

Install Services
On your Epicor application server, install Web Services used in this course. 1. Use Windows Explorer to navigate to the folder where the Epicor application web services installer is located. Example C:\Program Files\Epicor Software\Epicor905\WebServices or C:\Prog ram Files (x86)\Epicor Software\Epicor905\WebServices

2. Double-click the WS-Configuration (.NET 2.0 Edition).exe. 3. If an Install Warning window displays, click OK. The warning indicates you must run the web service installer on the same machine where you plan to install the services. Optionally, you can select the Do not show this message again check box. The WS-Configuration (.NET 2.0 Edition) window displays. 4. In the Progress Server field, enter your progress server name. The Progress Server field represents the name of the server on which your Progress application server is running. If the progress application server is on the same machine you are installing the services on, then localhost is a valid entry here; otherwise, enter your Epicor application server name. 5. In the Port field, enter the port number that the Epicor application server uses. Example The default port number is set to 9001.

6. In the Available Services section, select Part Service and DemandEntryService. 7. Click the right arrow button to add the services to the Services to be Installed pane. 8. In the Virtual Directory field, verify EpicorServices displays.

16

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

9. Click the Update Site button. 10. To the Installation Complete message, click OK. Notice the installed services display in the Installed Items pane in the lower left part of the window. 11. Exit the WS-Configuration (.NET 2.0 Edition) window.

Create a Configuration File


On your local machine, create a folder, for example, c:\Test. Navigate to the WSE 3.0 Configuration Tool. Start > All Programs > Microsoft WSE 3.0 > Configuration Tool Note The path may vary in your environment.

1. On the General sheet, select the Enable this project for Web Service Enhancements check box. 2. Navigate to the Policy sheet. 3. Select the Enable Policy check box. 4. Click the Add button. The Add or Modify Policy Friendly Name window displays. 5. In the name field, enter Test-XXX (where XXX are your initials) and click OK. The WSE Security Settings Wizard window displays. 6. Click Next. 7. For the Choose Client Authentication Method option, select Username. 8. Click Next. 9. Clear the Specify Username Token in code check box. 10. For the Username and Password, enter the credentials you use to connect to the Epicor application. Example Use manager/manager.

11. Click Next. 12. Clear the Enable WS-Security 1.1 Extensions check box. 13. Click Next. 14. Click Finish. 15. Form the File menu, select Save As. The Save As window displays. 16. Navigate to the folder you created.

Epicor ERP | 9.05.606

17

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

For example, c:\Test. 17. In the File name field, enter Test-XXX (where XXX are your initials) and click Save. 18. Exit the WSE 3.0 Configuration Tool.

Apply WSE 3.0 Server Policy


Navigate to Epicor Service Connect Administration Console. 1. Navigate to Connectivity > Service References. 2. Right-click Service References and select Add Reference. The Add Service Reference wizard displays. 3. Click Next. 4. In the Service URL field, enter the part service reference. Example http://<server name>/EpicorServices/PartService.asmx Note You must have security permissions to add a Web Service. There should be a network connection from the Service Connect server machine to the Web Service. To test the service reference, use your internet browser to verify the URL is correct.

5. In the Reference name field, enter PartService. 6. In the Service Reference Type field, select Generic Web Service. Note You must select this option in order to access WSE 3.0 configuration settings in future dialogs.

7. Click Next. 8. Verify the Integrated Windows Security check box is selected. 9. Click Next. 10. In the Policy settings window, select Custom. 11. In the Type field, select WSE 3.0. 12. On your local machine, navigate to the folder you created. Example c:\Test

13. Use an xml editor to open the ws3policyCache.config file and copy the content. Tip You can use Notepad to perform this operation.

14. Exit the xml editor.

18

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

15. In Epicor Service Connect Administration Console, paste the policy file content into the Custom section. Example <policies xmlns="http://schemas.microsoft.com/wse/2005/06/policy"> <extensions> <extension name="usernameOverTransportSecurity" type="Microsoft.Web .Services3.Design.UsernameOverTransportAssertion, Microsoft.Web.Service s3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <extension name="username" type="Microsoft.Web.Services3.Design.Use rnameTokenProvider, Microsoft.Web.Services3, Version=3.0.0.0, Culture=n eutral, PublicKeyToken=31bf3856ad364e35" /> <extension name="requireActionHeader" type="Microsoft.Web.Services3 .Design.RequireActionHeaderAssertion, Microsoft.Web.Services3, Version= 3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </extensions> <policy name="Test-XXX"> <usernameOverTransportSecurity> <clientToken> <username username="manager" password="manager" /> </clientToken> </usernameOverTransportSecurity> <requireActionHeader /> </policy> </policies>

16. In the Policy name field, enter Test-XXX (where XXX are your initials). 17. Click Next until you finish importing the service. The service reference is now using the created policy. 18. Review the import log and click Next. 19. Click Finish to exit the wizard.

Test the Part Service


1. Navigate to Connectivity > Service References. 2. In the tree view, select Part Service. The list of methods displays in the right pane. 3. Right-click the PartService.PartExists method and select Test. The Test Method window displays. 4. In the CompanyID field, enter EPIC06. 5. In the partNumber field, enter DSS-1010. 6. Click Test. 7. Verify the results. The Operation completed successfully message indicates the credentials in the policy file are valid. If necessary, address any issues that display in the msg:ers node.

Epicor ERP | 9.05.606

19

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

8. Click Close.

20

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

Database Operations
The DBOperation workflow element allows you to run one or several SQL statements (SELECT, INSERT, DELETE, UPDATE, EXEC) against one or several databases. SQL statements can use part of an XML document to update or select database data. The result of the SELECT statement can be put into an XML document for further workflow processing. You can use DBOperation to perform the following actions: Read, write, and update third party databases during workflow execution; this is required for data synchronization. Read values from application databases "on the fly"; this can be useful if one or several fields are not returned by the standard Business Object methods. Read additional Business Object values from custom user tables. To enhance the process, use the DB Lookup functoid, which uses specified selection criteria to perform database lookup. This functoid is found on the Special sheet in the Functoid Palette window. When you execute SQL statements, the DB Operation element logs each SQL statement and connection string that executes against a database into the ESC Events log.

Workshop - Create a Workflow


In this workshop, set up the required connectivity settings and create a workflow.

Create a CSV File


1. On your local machine, create the following folder structures: c:\channels\in\csv c:\channels\out c:\channels\input 2. On your local machine, navigate to Notepad. Example Start > Notepad

3. From the File menu, select New. 4. Enter the following information (where XXX are your initials). PartNum,SearchWord,PartDescription 9001-XXX,P9001,Part9001 9002-XXX,P9002,Part9002 9003-XXX,P9003,Part9003 5. From the File menu, select Save As. 6. Navigate to c:\channels\input. 7. In the Save as type field, select All Files.

Epicor ERP | 9.05.606

21

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

8. In the File name field, enter part_update_XXX.csv (where XXX are your initials). 9. Click Save. 10. Exit Notepad.

Add a Sender
1. In Epicor Service Connectivity Administration Console, navigate to Connectivity > Message attributes. 2. Right-click Senders and select Add New Sender. The Add New Sender window displays. 3. In the Sender name and Sender description fields, enter csv_sender_XXX (where XXX are your initials). 4. In the Add New Sender window, click OK.

Add a Message Type


1. Right-click Message Types and select Add New Message Type. The Add New Message Type window displays. 2. In the Message type name and Message type description fields, enter csv_import_XXX (where XXX are your initials). 3. Click the Add button. The New Action window displays. 4. In the Action name field, enter update. 5. In the Action description field, enter update. 6. In the New Action window, click OK. 7. In the Add New Message Type window, click OK.

Add an Input Channel


1. Navigate to Connectivity > Communication Setup > your server name > Channels > Input Channels. 2. Right-click Input Channels and select Add New. The Channel Properties window displays. 3. In the Channel Name field, enter csv_in_XXX (where XXX are your initials). 4. In the Listener type field, select FILE. 5. Select the Use scan interval check box and accept the default value of 1 seconds. 6. Click the Configure button.

22

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

The Channel configuration window displays. 7. Verify the Message properties sheet displays and select the following information. Field SenderName MsgType Action Value csv_sender_XXX (where XXX are your initials) csv_import_XXX update

8. Navigate to the Communicator properties sheet and enter the following information. Tip In many of these fields, there is a button to open a window where you can edit or select a value.

Field File path Mask Conversion

Value C:\channels\in\csv *.csv csv2xml.dll

9. In the Channel Configuration and Channel properties windows, click OK. The folder you entered in the File path field is now hot, which means that Service Connect consumes any .csv file you add to it. You cannot retrieve a file once it is consumed.

Generate a Schema
1. Navigate to Connectivity > Workflow packages. 2. Right-click Workflow packages and select New package. 3. In the Package name field, enter csv_package_XXX (where XXX are your initials) and click OK. 4. Within the Workflow packages node, right-click the newly created csv_package_XXX package and select New. Epicor Service Connect Workflow Designer displays. You must first generate a schema for the .csv input file you created. 5. In ESC Workflow Designer, from the Tools menu, select Schema Utility. The Schema Utility window displays. 6. From the File menu, select Generate Schema. The Load Sample File window displays. 7. Navigate to the c:\channels\input folder. 8. Select part_update.csv. 9. Click Open.

Epicor ERP | 9.05.606

23

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

10. In the Select Conversion Plug-in window, select csv2xml.dll and click OK. The Schema Generation window displays. 11. To the Would you like to import generated schema to SC message, click Yes. The Select Schema window displays. 12. In the File name field, enter csv_schema_XXX.xsd (where XXX are your initials) and click OK. 13. Exit Schema Utility.

Create a Workflow
1. On the Items toolbar, click the Conversion button. 2. To the right of the Start button, click in the workflow design area. The Properties window displays. 3. In the Properties window, click OK. 4. On the Items toolbar, click the .NET Call button. 5. To the right of the Conversion button, click in the workflow design area. The Properties window displays. 6. In the Properties window, click OK. 7. On the Items toolbar, click the Connection button. 8. Make the following connections: Start to Conversion Conversion to NetCall NetCall to Finish 9. Click Save. 10. To the validation message, click Yes. The Save New Workflow window displays. 11. In the Save workflow as field, enter csv_workflow_XXX (where XXX are your initials) and click Save.

Define the Conversion


1. Double-click the Conversion activity. The Properties window displays. 2. Navigate to the General sheet. 3. Next to the Input schema field, click the Browse button. The Select a schema window displays.

24

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

4. In the left pane, select User Schemas. 5. Select csv_schema_XXX.xsd (where XXX are your initials). 6. Click Next. 7. Click Finish. 8. Next to the Output schema field, click the Browse button. The Select a schema window displays. 9. In the left pane, select .NET Reference Schemas. 10. Double-click the PartService folder. 11. Select Epicor_Mfg_BO_Part_UpdateExt_Request.xsd. 12. Click Next. 13. Click Finish. 14. Remain in the Properties window.

Edit the Conversion


1. Next to the Conversion field, click the Edit button. The New Transformation - Conversion type window displays. 2. On the left side, expand the following nodes: msg > req > dta > table > row. 3. On the right, expand the following nodes: msg > req > dta > Epicor_Mfg_BO_Part_UpdateExt_Request > ds > UpdExtPartDataSet > Part. 4. Hold the Ctrl button and map the row node on the left to the Part node on the right. Tip If you hold the Ctrl button while you drag the line, links for all child fields generate automatically.

5. Set the following literal values for the fields on the right: Tip To set a literal value, right-click a node and select Set Literal value. Enter a value and click OK.

Field CompanyID Company TypeCode PricePerCode InternalPricePerCode

Value Epic06 Epic06 P E E

Epicor ERP | 9.05.606

25

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

6. Click Save. 7. In the Save Transformation File window, click OK. 8. Exit the NewTransformation window. 9. In the Properties window, click OK. 10. Click Save.

Define a .NET Call


1. Double-click the NETCall activity. The Properties window displays. 2. Navigate to the General sheet. 3. Click the Select button. The Request ID window displays. 4. Expand the PartReference > Epicor.Mfg.BO.Part nodes. 5. Select Part.UpdateExt and click OK. 6. In the Properties window, click OK. 7. Click Save.

Add a Message Map


Navigate to Epicor Service Connect Administration Console. 1. Navigate to Connectivity > Message Map. 2. Right-click Message Map and select Add new Request. The New Request ID window displays. 3. In the Sender name field, select csv_sender_XXX (where XXX are your initials). 4. In the Message type field, select csv_import_XXX (where XXX are your initials). 5. In the Message action field, select update. 6. Click the Select button. 7. In the Request ID window, clear the Channels, Web Methods and .NET Methods check boxes. 8. Select csv_package_XXX\csv_workflow_XXX (where XXX are your initials) and click OK. 9. In the New Request ID, click OK. The workflow is ready to be executed.

26

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

Run the Workflow


1. In Windows Explorer, navigate to the c:\channels\input folder. 2. Copy part_update_XXX.csv (where XXX are your initials). 3. Paste the file into the c:\channels\in\csv folder. This action triggers the workflow execution.

Verify the Results


Navigate to Epicor Service Connect Administration Console. 1. Navigate to Document Tracking > Inbound Messages. 2. Verify the Processing status of the latest activity is Complete. Tip To view the latest activity click the Timestamp column header to sort all records by time. If necessary, address any issues. You may also verify the newly created parts exist in the Epicor 9 application.

Workshop - Use a Database Operation


In the following workshop, edit the workflow you created and include the DBOperation element. The purpose of this workshop is to create a database output based on part numbers the source .csv file provides. The assumption is you will use the database output for further processing.

Add an Output Channel


1. In Epicor Service Connect Administration Console, navigate to Connectivity > Communication Setup > your server name > Channels > Output Channels. 2. Right-click Output Channels and select Add New. The Channel properties window displays. 3. In the Channel Name field, enter DB_out_XXX (where XXX are your initials). 4. In the Speaker type field, select FILE. 5. Click the Configure button. The Channel configuration window displays. 6. Navigate to the Communicator properties sheet. 7. In the File path field, select the following path: C:\channels\out. 8. Click OK. 9. In the Channel configuration window, click OK.

Epicor ERP | 9.05.606

27

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

10. In the Channel properties window, click OK.

Modify the Workflow


Navigate to Epicor Service Connect Workflow Designer. Verify the csv_package_XXX\csv_workflow_XXX (where XXX are your initials) workflow is opened. 1. Right-click the connector between the Part.UpdateExt element and Finish and select Delete. 2. On the Items toolbar, click the DBOperation button. 3. To the right of the Part.UpdateExt item, click in the workflow design area. The Properties window displays. 4. In the Properties window, click OK. 5. On the Items toolbar, click the Poster button. 6. To the right of the DBOperation item, click in the workflow design area. The Properties window displays. 7. In the Properties window, click OK. 8. Make the following connections: Part.UpdateExt to DBOperation DBOperation to Poster Poster to Finish 9. Click Save.

Define the DBOperation


1. Double-click the DBOperation activity. The Properties window displays. 2. Navigate to the Schema sheet. 3. Next to the Input schema field, click the Browse button. The Select a schema window displays. 4. In the left pane, select User Schemas. 5. Select csv_schema_XXX.xsd (where XXX are your initials). 6. Click Next. 7. Click Finish. 8. Navigate to the General sheet.

28

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

9. Click the Add button. The SQL Statement window displays. 10. Under the Connection string section, click the ... (browse) button. The Data Link Properties window displays. 11. In the Provider sheet, select the OLE DB Provider you use to connect to the application database. Example Microsoft OLE DB Provider for ODBC Drivers or Microsoft OLE DB Provider for SQL Server

12. Click Next. 13. In the Connection sheet, enter the data required to set up a connection to the application database. Example For an SQL Server database connection, enter the following data: Select your server name. Enter a user name and password to connect to the server or use the Windows NT Integrated security option. To connect to a database that requires a username and password, select the Allow saving password check box. Select the appropriate database. Example For a Progress database connection, enter the following data: Select your data source name. Enter a user name and password to connect to the server, for example, sysprogress/sysprogress. To connect to a database that requires a username and password, select the Allow saving password check box. Select the appropriate database.

14. Click the Test Connection button. 15. If the connection is successful, to the Test connection succeeded message, click OK. 16. In the Datalink Properties window, click OK. 17. If a Warning message displays, click OK. 18. View the Connection string created based on your ODBC parameters. Important Make a copy of the Connection string. For example, copy and paste the content to Notepad. You need the Connection string to define the DB Lookup functoid parameters in the following workshop. Example The following is an example of a Progress Connection string: Provider=MSDASQL.1;Password=sysprogress;Persist Security Info=True;User ID=sysprogress;Data Source=Epicor905;Initial Catalog=MFGSYS

Epicor ERP | 9.05.606

29

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Build the Statement


1. In the SQL Statement window, click the Select button. The Table selection window displays. 2. In the Tables list, select Part. Notice the Columns section populates with all the available fields in the table. 3. In the Table selection window, click OK. Notice the SQL Statement section displays the query that returns all the fields from the part table. 4. For an easier orientation, replace all field references with an asterisk (*). The current code displays: SELECT * FROM [Part] WHERE (1 = 0) 5. If you are running this statement against a Progress database, enter the following to modify the FROM line: FROM mfgsys.pub.part This must be done due to syntax and database structure differences between MS SQL and Progress. If you are building this statement against an SQL Database, skip this step. 6. Modify the WHERE clause to read the following: WHERE (Company='EPIC06' and PartNum='') In the following steps, limit the WHERE clause to only retrieve part numbers the csv file provides. 7. In the WHERE clause, directly after PartNum, right-click inside the empty quotation marks and select Insert link. The Rule Assistant window displays. 8. In the Name field, enter Part. 9. In the Tree view, expand msg > req > dta > table > row. 10. Map the PartNum on the left to the XPath on the right. 11. In the Rule Assistant window, click OK. The whole statement for SQL displays: SELECT * FROM [Part] WHERE (Company='EPIC06' and PartNum='Part') The whole statement for Progress displays: SELECT * FROM mfgsys.pub.part WHERE (Company='EPIC06' and PartNum='Part') 12. In the SQL Statement window, click OK.

30

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

13. In the Properties window, click OK.

Define the Poster


1. Double-click the Poster activity. The Properties window displays. 2. Navigate to the Fixed Channels sheet. 3. Click the Add button. The Select Channels window displays. 4. Select DB_out_XXX (where XXX are your initials) and click OK. 5. In the Properties window, click OK. 6. On the Standard toolbar, click Save.

Modify the CSV File


1. On your local machine, navigate to the following folder: c:\channels\input. 2. Right-click the part_update_XXX.csv (where XXX are your initials) file and select Edit. 3. In Notepad, modify the part information to display the following (where XXX are your initials). PartNum,SearchWord,PartDescription 9011-XXX,P9011,Part9011 9012-XXX,P9012,Part9012 9013-XXX,P9013,Part9013 4. From the File menu, select Save. 5. Exit Notepad.

Run the Workflow


1. In Windows Explorer, navigate to the c:\channels\input folder. 2. Copy the part_update_XXX.csv (where XXX are your initials) file. 3. Paste the file into the c:\channels\in\csv folder. This action triggers the workflow execution.

Verify the Results


Navigate to Epicor Service Connect Administration Console. 1. Navigate to Document Tracking > Inbound Messages. 2. Verify the Processing status of the latest activity is Complete.

Epicor ERP | 9.05.606

31

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Address any issues, if necessary. You can also verify the new parts exist in the Epicor application. 3. Navigate to the C:\channels\out folder. 4. View the xml file that contains the database output. Notice the file only contains information for the three parts you created.

Workshop - Use the Database Lookup Functoid


In the following workshop, use the database lookup functoid in the Conversion element. The database lookup functoid will modify part descriptions of the existing parts based on a lookup query. As a result, the part descriptions of the new parts will reflect their respective part numbers.

Modify the Conversion Element


Navigate to Epicor Service Connect Workflow Designer. 1. In the csv_workflow_XXX (where XXX are your initials) workflow, double-click the Conversion element. The Properties window displays. 2. On the General sheet, next to the Conversion field, click the Edit button. 3. On the left side of the New Transformation window, expand the following nodes: msg > req > dta > table > row. 4. On the right, expand the following nodes: msg > req > dta > Epicor_Mfg_BO_Part_UpdateExt_Request > ds > UpdExtPartDataSet > Part. 5. Select the link between the PartDescription nodes. 6. Click Delete. 7. To the confirmation message, click Yes. 8. On the Standard toolbar, click the Functoid Palette button. The Functoid pallete window displays. 9. In the Functoid pallete window, navigate to the Special sheet. 10. Click the database lookup icon (in the middle), drag the cursor to the center pane of the window, and release the mouse button. 11. Double-click the dbLookup box. The Functoid Properties window displays. 12. In the Arguments section, double-click the cnn string row. The Primary expression window displays. 13. In the Type field, verify Literal displays. 14. In the Value field, enter the connection string you noted in the Workshop - Use Database Operation.

32

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

Example Provider=MSDASQL.1;Password=sysprogress;Persist Security Info=True;User ID=sysprogress;Data Source=Epicor905;Initial Catalog=MFGSYS

15. In the Primary expression window, click OK. 16. Remain in the Functoid Properties window.

Create a Query
1. In the Functoid Properties window, double-click the select row. The Primary expression window displays. 2. In the Type field, verify Literal displays. 3. In the Value field, enter PartNum. 4. In the Primary expression window, click OK. 5. Double-click the from row. The Primary expression window displays. 6. In the Type field, verify Literal displays. 7. In the Value field, enter Part. Important When you build a query against a Progress database, enter mfgsys.pub.part.

8. In the Primary expression window, click OK. 9. In the Functoid Properties window, click OK.

Create a Where Expression


1. Verify the Functoid pallete window is open. 2. In the Functoid pallete window, navigate to the String sheet. 3. Click the concat functoid (second from the left), drag the cursor to the center pane of the window, and release the mouse button. 4. Double-click the concat functoid. The Functoid Properties window displays. 5. Double click the str1 row. The Primary expression window displays. 6. In the Type field, verify Literal displays.

Epicor ERP | 9.05.606

33

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

7. In the Value field, enter the following. PartNum=' 8. In the Primary expression window, click OK. 9. In the Functoid Properties window, click OK. 10. Map the PartNum on the left to the str2 = <empty> row. Now you must complete the created expression. 11. Double-click the concat functoid. The Functoid Properties window displays. 12. Double click the [str?] row. The Primary expression window displays. 13. In the Type field, verify Literal displays. 14. In the Value field, enter and apostrophe to finish the expression ('). 15. In the Primary expression window, click OK. 16. In the Functoid Properties window, click OK. 17. In the concat functoid header, click the word concat and drag the cursor to the [where?] row in the dbLookup functoid. This maps the result of the concat functoid to the where expression of the dbLookup functoid. 18. In the dbLookup functoid header, click the word dbLookup and drag the cursor to the PartDescription node of the target document. 19. In the Conversion Type window, click Save. The two functoids will search the database for a PartNumber number provided by the csv file and will supply the value to the PartDescription node of the target document. 20. Exit the Conversion Type window. 21. In the Properties window, click OK. 22. Click Save.

Run the Workflow


1. In Windows Explorer, navigate to the c:\channels\input folder. 2. Copy the part_update_XXX.csv (where XXX are your initials) file. 3. Paste the file into the c:\channels\in\csv folder. This action triggers the workflow execution.

34

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

Verify the Results


Navigate to Epicor Service Connect Administration Console. 1. Navigate to Document Tracking > Inbound Messages. 2. Verify the Processing status of the latest activity is Complete. Address any issues, if necessary. 3. Navigate to the C:\channels\out folder. 4. View the xml file that contains the database output. Notice the part descriptions of the previously created parts equal their respective part numbers. You can also verify the result in the Epicor application.

Channel Info Tag


Epicor Service Connect supports several ways to receive messages. This includes a file folder, FTP or mail server, SharePoint, MSMQ, and so on. There are situations when it is important to know how a workflow receives a message. This includes scenarios when you need to process messages differently, depending on an input file name. Create a message extension to expose the channel information inside the workflow. The available schemas for this extension are available in the http://scshost/schemas/UserSchemas/Standard/ChannelInfo / folder and include: ChannelInfoFile.xsd - for a FILE channel ChannelInfoFtp.xsd - for an FTP channel ChannelInfoPop3.xsd - for a POP3 channel ChannelInfoSharePoint.xsd - for a SharePoint channel Based on the input channel, the following information is sent to the message extension: File and FTP channels - full file path POP3 channel - email attributes (From, To, Subject and so on) SharePoint channel - URL address and channel ID

Workshop - Expose the Channel Info Tag


In this workshop, create a new message extension based on a ChannelInfoFile.xsd schema. Send the channel information to the MfgComment field in the Part business object. This information will be available for further processing in the .xml output the DB Operation and Poster elements provide.

Create a Message Extension


Navigate to Epicor Service Connect Workflow Designer. Verify the csv_package_XXX\csv_workflow_XXX (where XXX are your initials) workflow is open. 1. From the File menu, select Process Properties.

Epicor ERP | 9.05.606

35

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

The Process properties window displays. Tip Another way to access the window is to right-click in the empty workflow area and select Process Properties.

2. Navigate to the Message Extensions sheet. 3. Right-click msg:usr and select Add Container. The Add Container window displays. 4. In the Name field, enter ChannelInfo. 5. Next to the Schema field, click the browse button. The Select a schema window displays. 6. Click User Schemas. 7. Navigate to the Standard > ChannelInfo folder. 8. Select ChannelInfoFile.xsd. 9. Click Next. 10. Click Finish. 11. In the Add Container window, click OK. 12. In the Process properties window, click OK. The Message Extension is now available.

Modify the Conversion Element


1. Double-click the Conversion element. The Properties window displays. 2. Navigate to the General sheet. 3. Next to the Conversion field, click the Edit button. The Conversion type window displays. 4. In the Conversion type window, on the left, expand the following nodes: req > wfl > usr > Channel_Info > File. 5. On the right, expand the following nodes: msg > req > dta > Epicor_Mfg_BO_Part_UpdateExt_Request > ds > UpdExtPartDataSet > Part. 6. Map the Path node on the left to the MfgComment field on the right. 7. Click Save. 8. Exit the Conversion type window.

36

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

9. In the Properties window, click OK.

Modify the Output Channel


The Poster currently creates an .xml output using the %GUID% macro, for example, {963E0E8D-073C-43EB-B6EC-A89C8A0CD02F}.xml. Change the macro definition and assign a name to an .xml output. 1. Double-click the Poster activity. The Properties window displays. 2. Navigate to the Fixed Channels sheet. 3. Select the DB_out_XXX channel (where XXX are your initials) 4. Click the Configure button. The Output Channel Configuration window displays. 5. Navigate to the Communicator Configuration sheet. 6. In the Mask field, click the down arrow button to edit the Value. The File Name Template window displays. 7. In the Value field, enter DB_out_XXX-%COUNTER%.xml (where XXX are your initials). The %COUNTER% macro definition is replaced with a current value of the counter, which initializes during channel plugin startup. The value macro provides by is unique and is shared between all communication channels. 8. In the File Name Template window, click OK. 9. In the Output Channel Configuration window, click OK. 10. In the Properties window, click OK. 11. Click Save.

Run the Workflow


1. In Windows Explorer, navigate to the c:\channels\input folder. 2. Copy the part_update_XXX.csv (where XXX are your initials) file. 3. Paste the file into the c:\channels\in\csv folder. This action triggers the workflow execution.

Verify the Results


Navigate to Epicor Service Connect Administration Console. 1. Navigate to Document Tracking > Inbound Messages.

Epicor ERP | 9.05.606

37

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

2. Verify the Processing status of the latest activity is Complete. Address any issues, if necessary. 3. Navigate to the C:\channels\out folder. 4. Notice the new name of the created output file. 5. View the xml file that contains the database output. 6. View the MfgComment field that contains the channel info tag. The information is available for further processing.

Batch Execution
Use the batch execution to run sub-workflows as parallel threads, to improve the performance of business processes. Use the Sub-Workflow Properties window to set up a batch execution. This option is available only if you select Execute synchronously on the General sheet. System administrators can elect whether to use this feature as it depends on the underlying business process and hardware configuration. On the Cycling sheet, select the Run cycles simultaneously in several threads check box. Important You cannot use this option if the sub-workflow contains Task elements. When a workflow executes a sub-workflow and there are several cycles, Service Connect uses all available threads from the number of Threads count set in the Epicor Service Connect Administration Console > Connectivity node to execute sub-workflow cycles. The main workflow waits until the last sub-workflow cycle finishes.

Workshop - Test Batch Execution of Sub-Workflows


In this workshop, test how system performance improves when running synchronous sub-workflows as parallel threads. At the beginning of the workshop, restore the connectivity settings and files linked to this course that are required to perform the test. Important This task assumes you are working with the embedded version of this course, launched from the Epicor application.

Download Files
The first step is to download the zipped file linked in this course to your local machine. The link at the bottom of this page contains a connectivity settings backup, window batch file, and .xml file that triggers the workflow execution. 1. In the embedded version of this course, click the Backup link at the bottom of the page. 2. Save the BatchExecution.zip file to the c:\channels\input folder on your machine. 3. Extract the zipped file.

38

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

4. The following are extracted in the input folder. batch_backup.scs WSERequest.xm xx.bat

Restore Connectivity Settings


Restore the backup file to load workflows, user schemas, service reference, asynchronous pool, and channel settings required to perform the following tasks. Navigate to Epicor Service Connect Administration Console. 1. Right-click the Connectivity node and select Restore. The Open window displays. 2. Navigate to the c:\channels\input\BatchExecution folder. 3. Select batch_backup.scs. 4. Click Open. The Restore Connectivity Settings window displays. 5. Click Next until the References Re-import window displays. Tip When asked to resolve the names of communication servers during the import, in the New Name field, select your server name. When asked to resolve name conflicts of already existing items, select the Apply to all restored items check box and click Overwrite.

6. Verify the Run Re-import Service References wizard upon restore completion check box is selected. After you import a Web Service reference, you must use parameters specified during the first import to regenerate it. This task is necessary when a Web Service changes its interface. Use this option to automatically re-import a service reference. Important If you are on a previous version than Epicor Service Connect 9.05.605, this option is not available and you have to re-import the service reference manually using the next task - Re-import the Service Reference. Tip You may use the Copy button to copy the list of restored items to a clipboard. Use the information to keep track of restored items within your service connect installation.

7. Select the Create folders for the file channels check box. 8. Click Next. The list of all restored items displays. 9. Click Finish. 10. View the list of all restored settings and click Finish. The Re-import Service References wizard displays. Notice the service reference is automatically selected. 11. Click Next.
Epicor ERP | 9.05.606 39

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

12. When the Web Service import successfully finished message displays, click Finish.

Re-import the Service Reference


Important If you are on a previous version than Epicor Service Connect 9.05.605, use the below steps to manually re-import the service reference. If the service reference was automatically re-imported in the previous task, skip the below steps and proceed to the next task. 1. Navigate to the Connectivity > Service References node. 2. Right-click the Sanity_LocalWS service reference and select Re-import. 3. In the wizard, click Next until the Web Service import is finished. 4. Click Finish. This service reference is a basic start-poster-finish workflow exposed as a Web Service. It demonstrates that any Epicor Service Connect workflow can be exposed as a standard Web Service and imported to Epicor Service Connect. In an actual business scenario, this web service can be replaced with any web service.

Prepare the Workflow


Verify the main workflow settings. For the first performance test, disable a batch execution. 1. Navigate to the Connectivity > Workflow packages node. 2. From the list of packages in the left pane, select Sanity. The list of included workflows displays. 3. Right-click MainWF and select Edit. The workflow displays in Epicor Service Connect Workflow Designer. 4. Double-click the Sub-Workflow item. The Properties window displays. 5. Navigate to the General sheet. 6. In the Workflow field, notice the name of the sub-workflow the main workflow calls. 7. Verify the Execute synchronously option is selected. This allows you to run sub-workflows in parallel threads. 8. Navigate to the Cycling sheet. 9. Clear the Run cycles simultaneously in several threads check box. 10. In the Properties window, click OK. 11. Click Save.

40

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

Enable Channels
After you import channels, you must enable them before you can use them. Navigate to Epicor Service Connect Administration Console. 1. Navigate to Connectivity > Communication Setup > your server name > Channels > Input Channels. 2. Double-click the batch_in channel. The Channel properties window displays. 3. Select the Enable channel check box. 4. Click Configure. The Channel configuration window displays. 5. Navigate to the Communicator properties sheet. Notice the channel expects there to be an .xml file in the c:\channels\in\batch folder. This folder structure should be created during the connectivity settings restore process. If necessary, create this folder structure on your machine. 6. In the Channel configuration window, click OK. 7. In the Channel properties window, click OK. 8. Navigate to Connectivity > Communication Setup > your server name > Channels > Output Channels. 9. Right-click the SubWFTest channel and select Enable.

Trigger the Workflow


To test system performance, invoke sub-workflow executions all at once. Use the windows batch file to create 30 .xml files based on a template. 1. Navigate to the c:\channels\input\BatchExecution folder. 2. Copy the WSERequest.xm and xx.bat files. 3. Paste the files into the c:\channels\in\batch folder. In the following steps, use the command prompt to run a batch file. 4. From the Start menu, select Run. 5. In the Open field, enter cmd. 6. Click OK. The command prompt window displays. 7. If necessary, in the command line, enter c: to switch to the c: drive. Navigate to the batch folder.

Epicor ERP | 9.05.606

41

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

8. In the command line, enter the following and press Enter. cd\channels\in\batch 9. To execute the batch file, enter the following and press Enter. xx.bat WSERequest.xm After the batch file executes, it replicates the WSERequest.xm file that serves as a parameter. The code first puts in order numbers 00, 01 and so on up to 29 and then adds the .xml extension to all the replicated files. As a result, 30 .xml files are dropped in the directory the input channel monitors. Notice the files disappear from the batch folder. 10. Minimize the command prompt window.

Verify the Results


Navigate to Epicor Service Connect Administration Console. 1. Navigate to the Document Tracking > Inbound Messages. You should see 30 messages with batch_in in the Execution point column and the Complete processing status. If some of the processes are still running, press F5 to refresh the information and wait until all processes finish. Address any issues, if necessary. 2. Navigate to Connectivity > Asynchronous Pools. 3. View the Test pool parameters. 4. Verify the Process Requests field displays 30. 5. Note the value that displays in the One Request Time field. Example 11 seconds

6. Right-click the Test pool and select Reset statistics. 7. To the warning message, click OK.

Enable a Batch Execution


In the following steps, enable a batch execution and verify whether the time required to process one request improves. Navigate to Epicor Service Connect Workflow Designer. Verify the Sanity\MainWF workflow is open. 1. Double-click the Sub-Workflow item. The Properties window displays. 2. Navigate to the Cycling sheet.

42

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

3. Select the Run cycles simultaneously in several threads option. 4. In the Threads count field, enter 5. 5. In the Properties window, click OK. 6. Click Save.

Trigger the Workflow


1. Maximize the command prompt window. 2. On your keyboard, press Shift + up arrow to invoke the last command. xx.bat WSERequest.xm 3. Press Enter. The batch file executes. 4. Exit the command prompt window.

Verify the Results


Navigate to Epicor Service Connect Administration Console. 1. Navigate to Document Tracking > Inbound Messages. Verify the last 30 processing statutes where the execution point is batch_in are marked as Complete. If some of the processes are still running, press F5 to refresh the information and wait until all processes finish. Address any issues, if necessary. 2. Navigate to Connectivity > Asynchronous Pools. 3. View the Test pool parameters. 4. Verify the Process Requests field displays 30. 5. Notice the value that displays in the One Request Time field improved. Example 8 seconds

Break Cycle
Use the break cycle functionality to break a cycled sub-workflow. It is necessary to break a sub-workflow execution in some cases. Example You import a complex sales order with many lines. Each line is individually processed in a sub-workflow. If an error occurs in any of the lines, you want the sub-workflow to stop looping instead of processing the remaining lines.
Epicor ERP | 9.05.606 43

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Use the <BreakSubWFLooping> node within the <wfl> section to break the execution. The main workflow can change how to call a sub-workflow in three ways: 1. 2. 3. Looping is interrupted and the trace status is set to Complete. Looping is interrupted and the trace status is set to In Progress. Looping is interrupted and the trace status is set to Abortive.

Workshop - Break a Cycled Sub-Workflow


In this workshop, enhance the main workflow used in the Workshop - Test a Batch Execution of Sub-Workflows by adding a Choice and a Conversion element.

Disable Batch Execution


Disable execution of sub-workflows in parallel threads. Navigate to Epicor Service Connect Workflow Designer. 1. Verify the Sanity\MainWF workflow is open. 2. Double-click the Sub-Workflow element. The Properties window displays. 3. Navigate to the Cycling sheet. 4. Clear the Run cycles simultaneously in several threads check box. 5. Remain in the Properties window.

Modify a Sub-Workflow
1. In the Properties window, navigate to the General sheet. 2. Clear the Pass msg:usr section check box. 3. Next to the Workflow field, click the Edit button. The sub-workflow displays for editing. 4. In the Properties window, click OK. 5. Delete the connection between the Start and the Conversion elements. 6. On the Items toolbar, click the Choice button. 7. To the left of the Conversion item, click in the workflow design area. The Properties window displays. 8. In the Properties window, click OK. 9. On the Items toolbar, click the Conversion button.

44

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

10. Above the Choice item, click in the workflow design area. The Properties window displays. 11. Navigate to the Appearance sheet. 12. In the Caption field, enter Break Cycle. 13. Click OK. 14. Make the following connections: Start to Choice Choice to Conversion Choice to Break Cycle Break Cycle to Finish 15. Click Save. 16. To the confirmation message, click Yes.

Edit the Choice Item


1. Double-click the Choice item. The Properties window displays. 2. Verify the Schema sheet displays. 3. Click the Browse button. The Open Schema window displays. 4. Select User Schemas. 5. Navigate to the Sanity folder. 6. Select SubWFSchema.xsd. 7. In the Open Schema window, click OK. 8. Remain in the Properties window.

Configure the First Connection


1. In the Properties window, navigate to the Rules sheet. 2. Select the first row where 001 displays in the Connection column. This is a connection between the Choice item and the Conversion. 3. Click the Configure button. The Rule Assistant window displays.

Epicor ERP | 9.05.606

45

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

4. Expand the following nodes: msg > req > dta > Part. 5. To create a condition based on a part number, in the right pane, right-click and select Show Functoid Palette. The Functoid Palette window displays. 6. Navigate to the Operators sheet. 7. Drag and drop the Equals functoid (first from the left) to the right pane. 8. Map the PartNum from the left to the param1=<empty> node in the functoid. 9. Double-click the functoid. The Functoid Properties window displays. 10. Double-click the param2 row. The Primary expression window displays. 11. In the Type field, verify Literal displays. 12. In the Value field, enter 100011. 13. Click OK. 14. In the Functoid Properties window, click Close. 15. Close the Functoid Palette window. 16. In the Functoid header, click the equals sign and drag it to the XPath mark. 17. At the bottom of the Rule Assistant window, in the Admit Value field, select False. 18. Navigate to the XPath expression sheet. 19. Select and copy the expression. You will use the same expression to build the condition for the second connection. 20. In the Rule Assistant window, click OK. Remain in the Properties window.

Configure the Second Connection


1. On the Rules sheet, select Connection 002. This is a connection between the Choice item and the Break Cycle Conversion. 2. Click the Configure button. The Rule Assistant window displays. 3. Navigate to the Xpath expression sheet. 4. Paste the expression you copied in the previous task.

46

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

5. In the Admit Value field, verify True displays. This means the process will be routed to the Break Cycle conversion once the PartNum = 100011 condition is met. Otherwise, the workflow will take the original path. 6. In the Rule Assistant window, click OK. 7. In the Properties window, click OK. 8. Click Save. 9. To the warning message, click Yes.

Run the Workflow


First test the sub-workflow without breaking it. 1. Navigate to the c:\channels\in\batch folder. Recall the input channel is expecting an .xml file to trigger the workflow. 2. Use an XML editor to view the WSERequest.xm file. Example Use Notepad.

3. View the part information that will be processed. Recall the Choice item should change the sub-workflow path once part number 100011 is processed. 4. Exit the XML editor. 5. Click the WSERequest.xm file and change the extension to WSERequest.xml. Notice the file is consumed by an input channel. 6. Navigate to the Epicor Service Connect Administration Console. 7. Navigate to the Document Tracking > Inbound Messages. 8. Double-click the related activity. Double-click a process where the execution point is batch_in and the Processing status is Complete. Tip If the process is still in progress, press F5 to refresh the information and wait until the process finishes. The Activity Progress window displays. 9. The below are the expected results: All iterations except iteration #11, take the original path. In iteration #11, the condition defined in the Choice item is satisfied and the sub-workflow takes the new path. Address any issues, if necessary. In the following steps, you will modify the sub-workflow to stop looping once the condition is met.

Epicor ERP | 9.05.606

47

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Edit the Break Cycle Conversion


In this part of the workshop, you will enter a literal value in the <BreakSubWFLooping> node in the <wfl> section to break cycle. Navigate to the Epicor Service Connect Workflow Designer. 1. Verify the Sanity\SubWF workflow is open. 2. Double-click the Break Cycle conversion. The Properties window displays. 3. On the General sheet, click the Edit button. The New Transformation window displays. 4. On the right side, expand the following nodes: msg > req > wfl. 5. Right-click the BreakSubWFLooping node and select Set Literal Value. 6. In the Literal value field, enter 1. 7. Click OK. 8. In the New Transformation window, click Save. 9. In the Save Transformation File window, click OK. 10. Exit the New Transformation window. 11. In the Properties window, click OK. 12. Click Save.

Run the Workflow


1. Navigate to the c:\channels\input\BatchExecution folder. 2. Copy the WSERequest.xm file. 3. Paste the file into the c:\channels\in\batch folder. 4. Click the WSERequest.xm file and chance the extension to WSERequest.xml. 5. To the confirmation message, click Yes. 6. Navigate to Epicor Service Connect Administration Console. 7. Navigate to the Document Tracking > Inbound Messages. 8. Double-click the related activity. Double-click a process where the execution point is batch_in and the Processing status is Complete. Tip If the process is still in progress, press F5 to refresh the information and wait until the process finishes.

48

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

The Activity Progress window displays. 9. The below are the expected results: Iterations #1 - #10 take the original path Iteration #11 satisfies the condition defined in the Choice item and takes the new path - Break Cycle Conversion and Finish Looping is stopped, no more iterations are processed Address any issues, if necessary.

Epicor ERP | 9.05.606

49

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Service Connect and Business Process Management


Use the Service Connect and Business Process Management (BPM) functionality to call a Service Connect workflow from the Business Process Management module. Use BPM to create workflows that automate, execute, and monitor business processes. The workflows, known as directives, extend the base functionality of the Epicor application without requiring customizations or affecting your ability to use future releases of the software. A directive is a set of conditions and actions associated with either a business object method or a database table. If specified conditions are met, the actions execute. To further extend the versatility of BPM, you can call Service Connect workflows from a BPM directive. The following topics explain how to call a Service Connect workflow from a directive associated with a business object. Directives for database tables, known as data directives, can also call workflows. In the following scenario, use the Epicor application to create a new demand contract and demand entry for a part. If part information is updated, you want to be notified about the change in a demand record. Create a new method directive for a part business object that will call an Epicor Service Connect workflow. The workflow updates a demand business object if part information changes.

Workshop - Create Demand


In this workshop, create a new demand contract and establish demand for part DSS-1010. Once finished, use the Business Logic Tester tool to explore the business object.

Create a Demand Contract


Navigate to the Epicor application. The first step is to create a new demand contract for part DSS-1010. Navigate to Demand Contract Entry. Menu Path: Sales Management > Demand Management > General Operations > Demand Contract Entry Tip The CRM menu path is: Customer Relationship Management > Demand Management > General Operations > Demand Contract Entry 1. Click New. 2. In the Contract field, enter a number, for example, 1. This field displays the unique identifier for the demand contract and must be unique for the customer. When a number entered is already in use, search for the existing demand contracts and use a different number. Make note of the contract number. 3. In the ID field, enter Dalton and press Tab. 4. From the New menu, select New Contract Detail. The Line > Detail sheet displays. 5. In the Part field, enter DSS-1010 and press Tab. 6. In the Total Contract Quantity field, enter 100. 7. Click Save.

50

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

8. Exit Demand Contract Entry.

Create New Demand


Navigate to Demand Entry. Menu Path: Sales Management > Demand Management > General Operations > Demand Entry Tip The CRM menu path is: Customer Relationship Management > Demand Management > General Operations > Demand Entry 1. Click New. 2. In the Contract field, enter the contract number you created in the previous task. Notice the Sold To fields populate. 3. In the PO field, enter a number. Note The PO must be unique for the customer. If the number you entered is already in use, enter a different number. Note the PO number you entered. 4. If necessary, to the confirmation message, click Yes. 5. Click Save. 6. From the Actions menu, select Demand Line > Get Demand Lines From Contract. 7. On Line 1, select the Selected check box. 8. Click OK. 9. From the Actions menu, select Demand Schedule > Create Demand Schedule. The Create Demand Schedule window displays. 10. Accept all defaults and click OK. 11. To the message, click OK. 12. Click Save. 13. Exit Demand Entry. The demand from customer Dalton now exists for part DSS-1010.

Explore Business Objects


Important ICE 2.0.5 Business Logic Tester must be installed to perform this task. For more information, review the Environment Setup topic. The Business Logic (BL) Tester is a tool you can run to test and review the public BL methods within a business object.

Epicor ERP | 9.05.606

51

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

In this task, explore the demand entry business object and locate the <DemandContractNum> value the application assigns to the contract number you created. Obtaining this number is required for correct workflow execution in the following tasks. Tip Use this tool when you build your Epicor Service Connect workflow to check the business object structure and to see any if errors originate from the business layer or the user interface. Navigate to ICE 2.0.5 Business Logic Tester. 1. From the Tools menu, select Options. The BL Tester - Options window displays. 2. Verify the Appserver, Log on information, and Business Objects Directory is set up correctly. Example The following is an example of the Business Objects Directory. C:\Epicor\Epicor905\Client

3. Click Update. 4. From the File menu, select Open. 5. In the Open window, select Epicor.Mfg.BO.DemandEntry.dll. 6. Click Open. 7. In the Tester Method Viewer window, accept all defaults and click Invoke. 8. In the Results sheet, click the XML button. The content of the business object displays in XML format. 9. Search for the record that contains the following attributes. Tip You can copy the content to an XML editor for easier navigation through the output. Company - Epic06 CustNum - 9 (Dalton) PONum - Purchase order number you assigned in a previous task Example <DemandHeadList> <Company>EPIC06</Company> <DemandContractNum>13</DemandContractNum> <DemandHeadSeq>1</DemandHeadSeq> <OrderNum>0</OrderNum> <CustNum>9</CustNum> <PONum>6789</PONum>

10. Once you obtain the information, note the DemandContractNum and DemandHeadSeq values. 11. Exit ICE 2.0.5 Business Logic Tester.

52

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

Workshop - Create the Workflow


In this workshop, create the workflow Business Process Management module will call.

Add a Service Reference


Navigate to Epicor Service Connect Administration Console. 1. Navigate to the Connectivity node. 2. Right-click the Service References node and select Add Reference. The Add Service Reference window displays. 3. In the Add Service Reference window, click Next. 4. In the Service URL field, enter http://<server name>/EpicorServices/DemandEntryService.asmx 5. In the Reference name field, enter DemandEntryService. 6. In the Reference type field, select Epicor Web Service. 7. Verify the Import all methods check box is selected. 8. Click Next. The Security settings window displays. 9. In the Epicor Security section, in the User field, enter manager. 10. In the Password field, enter manager. 11. In the Encryption field, select Epicor.Mfg.WS.Cryptography. 12. In the Add Service Reference window, click Next. 13. Review the information and click Next. The Service Import process can take a few minutes. 14. Once complete, at the bottom of the Add Service Reference window, the Web Service import successfully finished message displays. 15. In the Add Service Reference window, click Next. 16. In the Add Service Reference window, click Finish.

Create the Workflow


Navigate to Epicor Service Connect Workflow Designer. 1. Click New. 2. In the New Process window, click OK. 3. Create the following workflow that contains two Conversions and two Web Methods.

Epicor ERP | 9.05.606

53

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

4. Click Save. 5. To the warning message, click Yes. 6. In the Save New Workflow window, click New. The Create Package window displays. 7. In the Package name field, enter bpm_XXX (where XXX are your initials) and click OK. 8. In the Save workflow as field, enter bpm_workflow_XXX (where XXX are your initials). 9. Click Save. 10. To the warning message, click Yes.

Edit the First Conversion


The first Conversion and Web Method call the existing record from the demand entry business object. 1. Double-click the first Conversion. The Properties window displays. 2. On the General sheet, next to the Output Schema field, click the Browse button. 3. In the Select a schema window, in the left pane, select Web-Services schemas. 4. Double-click DemandEntryService and select GetByIDRequest.xsd. This conversion will not use the input schema. 5. Click Next.

54

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

6. Click Finish. 7. Next to the Conversion field, click the Edit button. The New Transformation - Conversion type window displays. 8. In the New Transformation window, on the right, expand the following nodes: msg > req > dta > GetByIDRequest. 9. Enter the following literal values. CompanyID - Enter EPIC06. demandContractNum - Enter the contract number gained from Business Logic Tester, for example, 13. demandHeadSeq - Enter the sequence number gained from Business Logic Tester, for example, 1. 10. Click Save. 11. In the Save Transformation File window, click OK. 12. Exit the New Transformation - Conversion type window. 13. In the Properties window, click OK.

Edit the First Web Method


1. Double-click the first WebMethod. The Properties window displays. 2. On the General sheet, next to the Request ID field, click Select. The Request ID window displays. 3. Expand the DemandEntryService node. 4. Select DemandEntryService.GetByID. 5. Click OK. 6. In the Properties window, click OK.

Edit the Second Conversion


In the second Conversion, use the response from the first web method and create a new demand update that contains part change information. 1. Double-click the second Conversion. The Properties window displays. 2. Next to the Input Schema field, click the Browse button. 3. In the Select a schema window, in the left pane, select Web-Services schemas. 4. Double-click DemandEntryService and select GetByIDResponse.xsd.

Epicor ERP | 9.05.606

55

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

5. Click Next. 6. Click Finish. 7. Next to the Output Schema field, click the Browse button. 8. In the Select a schema window, in the left pane, select Web-Services schemas. 9. Double-click DemandEntryService and select UpdateRequest.xsd. 10. Click Next. 11. Click Finish. 12. Next to the Conversion field, click the Edit button. The New Transformation - Conversion type window displays. 13. In the New Transformation window, on the left, expand the following nodes: msg > req > dta > GetByIDResponse > result > DemandEntryDataSet. 14. On the right, expand the following nodes: msg > req > dta > UpdateRequest > DemandEntryData > DemandEntryDataSet. 15. Hold Ctrl and map the followings nodes: DemandHead to DemandHead DemandDetail to DemandDetail 16. Remain in the New Transformation - Conversion type window.

Modify the Demand Record


In this task, enter new information about a part that changed and create a time stamp. 1. In the New Transformation - Conversion type window, on the right side, expand the DemandHead node. 2. Delete mappings for the following nodes: Character01 Character02 3. Enter the following literal values: Company - Epic06. Character01 - Part information has changed - BPM. CompanyID - Epic06 (under msg > req > dta > UpdateRequest). 4. On the Standard toolbar, click the Functoid Palette button. The Functoid pallete window displays. 5. In the Functoid pallete window, navigate to the Date-time sheet.

56

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

6. Click the Current Date Time icon (second from the left), drag the cursor to the center pane of the window, and release the mouse button. 7. Exit the Functoid pallete window. 8. Map the functoid to the Character02 node on the right. 9. Click Save. 10. In the Save Transformation File window, click OK. 11. Exit the Conversion type window. 12. In the Properties window, click OK. 13. On the Standard toolbar, click Save.

Edit the Second Web Method


1. Double-click the second WebMethod. The Properties window displays. 2. On the General sheet, next to the Request ID field, click Select. The Request ID window displays. 3. Expand the DemandEntryService node. 4. Select DemandEntryService.Update. 5. Click OK. 6. In the Properties window, click OK. 7. In the workflow, right-click in the blank space and select Process Properties. 8. Navigate to the Document Tracking sheet. 9. In the Tracing status field, select Required. This step is required to view the process results in the Document Tracking node. 10. Click OK. 11. Click Save. The workflow is ready to be called from BPM.

Epicor ERP | 9.05.606

57

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Workshop - Create a Method Directive


In this workshop, create a method directive that calls the Epicor Service Connect workflow when part DSS-1010 is updated.

Add a Method Code


Navigate to Method Directives. Menu Path: System Management > Business Process Management > Setup > Method Directives Important This program is not available in the Epicor Web Access interface. You can launch this program from an Epicor Smart Client (Windows ) interface. 1. On the Detail sheet, click the Method Code button. 2. In the Method Name Starting At field, enter U. 3. In the Business Object field, select Part. 4. Click Search. 5. In the Search Results grid, select Update. 6. Click OK. The Business Object returns on the form. 7. In the Method Description field, enter ESC-XXX (where XXX are your initials). 8. Click Save.

Add a Pre-Processing Directive


1. From the New menu, select New Pre-Processing. 2. In the Directive Name field, enter ESC_Call. 3. Select the Prevent Endless Loops check box. This check box allows you to restrict the number of concurrent directive instances and protect the application from endless loops. Example You can create a directive that calls an Epicor Service Connect workflow, which in turn, activates the directive. This scenario introduces an endless loop into the application. Before you activate the next directive, the application verifies the value has been reached. If it has been reached, the application throws an exception.

4. Click Save.

Add a Condition
1. In the Method Directives window, click the Conditions button.

58

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

2. Click the Add Line icon. 3. In the User Text field, select the specified field of the changed row is equal to the specified expression. 4. Click the first specified. 5. In the Table field, select ttPart. 6. Select the PartNum check box. 7. Click OK. 8. At the end of the User Text field, click specified. 9. In the Editor text box, enter "DSS-1010". 10. Click the Check Syntax button. Note If your query is correct, the Syntax is OK message displays. If you do not receive this message, verify you entered everything exactly as it appears above. You can also remove all hard carriage returns in the text box (the text should be one string).

11. In the Specify an expression window, click OK. 12. In the Conditions window, click OK.

Add an Action
1. In the Method Directives window, click the Actions button. 2. Click the Add Line icon. 3. In the User Text field, select call the specified Epicor Service Connect Workflow asynchronously. 4. Click the word asynchronously. Notice synchronous execution is now set. 5. Click the word specified. The Logon to Service Connect window displays. 6. In the Server field, select the server where Epicor Service Connect is installed. Notice the scshost value defaults. When the Epicor application is installed on the same server as Epicor Service Connect, scshost is a valid option. 7. Enter the User Name and Password, for example, admin / no password. 8. Click OK. The Select Workflow window displays. 9. Expand the bpm_XXX node and select bpm_workflow_XXX (where XXX are your initials).

Epicor ERP | 9.05.606

59

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

10. In the Select Workflow window, click OK. 11. In the Actions window, click OK. 12. Select the Enabled check box. 13. Click Save. 14. Exit Method Directives.

Workshop - Test BPM Execution


In this workshop, modify the description for part DSS-1010. This triggers the workflow that updates the demand record with a message and a time and date stamp.

Modify Part Information


Navigate to Part Maintenance. Menu Path: Sales Management > Demand Management > Setup > Part Tip The CRM menu path is: Customer Relationship Management > Demand Management > Setup > Part

1. In the Part field, enter DSS-1010 and press Tab. 2. In the Description field, enter a description. 3. Click Save. This triggers the method directive that calls the Epicor Service Connect workflow. 4. Exit Part Maintenance.

Test the Result


Navigate to Epicor Service Connect Administration Console. 1. Navigate to Document Tracking > All Activities. 2. Verify the Processing status of the latest activity is Complete. Address any issues, if necessary. 3. Double-click the process to display the Activity Progress window. 4. Double-click the DemandEntryService.Update web method information. The Trace Details window displays. 5. On the Message Data > xml sheet, scroll down an verify the Character01 field contains the part information message, and Character02 contains the date and time information. 6. In the Trace Details window, click OK. 7. In the Activity Progress window, click OK.

60

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Process

8. Navigate to Events > All logs. 9. View the BPM process information. Optionally, modify a different part to test the method directive. This action will not trigger the workflow execution. Once done testing, navigate to the Method Directives program and disable the directive.

Customized View
Use the Document Tracking node to track documents as they move through various stages of the business process and resume interrupted document processing. During processing, a message that contains the document passes through various Service Connect components, such as input and output Channels, Workflows (Processes), Tasks, and so on. Each Service Connect component can change the message somehow when it performs a certain activity. Use Document Tracking to do the following: Trace messages - View traces of a message passing through Service Connect components. Trace activities - Trace facts of performing some work by Service Connect components. Activity traces contain metadata that relates to the activity they represent. The following terms are used in the Document Tracking interface: Execution Point - Also called an executor, this is an identifiable object that performs observable activity. It can be, for example, Service Connect, as a system installed on a set of servers or a Service Connect component. Time Flow - An execution point can perform several operations simultaneously and all of them should be observed separately. For each such operation there is a separate sequence of time slices, which is called a time flow. Time slices in different time flows can intersect. Activity - This is a set of actions an execution point (a Service Connect component or a system) performs. Activities are hierarchical; one activity can represent a piece of the progress of its parent activity. Inbound Message - This is a message the Epicor Service Connect system receives. Trace - This is a fact fixed by the Document Tracking system. There are two types of traces - activity traces and message traces. Start Message of Activity - This is a message that starts an activity. In general, the start message is not the same as an inbound message because it can be generated inside the system (for example, by a business event) and still be an input to an activity. Custom Views You can create child views to display filtered traces that correspond to certain criteria in a separate view.

Workshop - Create a Customized View


In the following workshop, create a customized view that displays processes launched in the current day.

Create a View
Navigate to the Epicor Service Connect Administration Console. 1. Right-click the Document Tracking node and select New View. The View Properties window displays.

Epicor ERP | 9.05.606

61

Process

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

2. In the Name field, enter Today-XXX (where XXX are your initials). 3. In the Search type window, verify <Any messages> displays. Note If you create a child view, the Search type field fills automatically with a value it inherits from the parent view.

4. Click the Columns button. The Show Columns window displays. 5. In the Selected columns section, hold the Ctrl key and select the Document Type and First business attribute columns. 6. Click the Remove button to remove the columns from the list. 7. In the Show Columns window, click OK. Remain in the View Properties window.

Apply a Filter
1. In the View Properties window, click the Filter button. The Filter window displays. Tip Use the Documents sheet to display documents that contain certain business information. In the Document type field, select a document type from the list of pre-defined types. In the Document filter grid, set selection criteria for business attributes available for the selected document type.

2. Navigate to the Advanced sheet. 3. Click Field and select Timestamp. 4. In the Value field, select today. 5. Click the Add to list button to activate the entered expression. 6. In the Filter window, click OK. 7. In the View Properties window, click OK. 8. Click the Today-XXX (where XXX are your initials) view. Verify the view only displays today's processes. If necessary, press F5 to refresh the information.

62

Epicor ERP | 9.05.606

Advanced Epicor Service Connect 9.05 for Epicor ERP Course

Conclusion

Conclusion
Congratulations! You have completed the course. Please take a moment to let Epicor know how to serve you better by completing a course evaluation at http://www.keysurvey.com/survey/191084/2e21/ or by clicking the Course Evaluation link below. Your feedback provides the guidelines for the future direction of Epicor education.

Epicor ERP | 9.05.606

63

Additional information is available at the Education and Documentation areas of the EPICweb Customer Portal. To access this site, you need a Site ID and an EPICweb account. To create an account, go to http://support.epicor.com.

You might also like