Top Banner
Epicor ERP Advanced Epicor Service Connect 9.05 for Epicor ERP Course 9.05.606
64
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Advanced.service.connect9

Epicor ERPAdvanced Epicor ServiceConnect 9.05 for Epicor ERPCourse9.05.606

Page 2: Advanced.service.connect9

Disclaimer

This document is for informational purposes only and is subject to change without notice. This document and itscontents, including the viewpoints, dates and functional content expressed herein are believed to be accurate as of itsdate of publication. However, Epicor Software Corporation makes no guarantee, representations or warranties withregard to the enclosed information and specifically disclaims any applicable implied warranties, such as fitness for aparticular purpose, merchantability, satisfactory quality or reasonable skill and care. As each user of Epicor software islikely to be unique in their requirements in the use of such software and their business processes, users of this documentare always advised to discuss the content of this document with their Epicor account manager. All information containedherein is subject to change without notice and changes to this document since printing and other important informationabout the software product are made or published in release notes, and you are urged to obtain the current releasenotes for the software product. We welcome user comments and reserve the right to revise this publication and/ormake 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 ofany consulting services by Epicor personnel shall be pursuant to Epicor's standard services terms and conditions. Usageof the solution(s) described in this document with other Epicor software or third party products may require the purchaseof licenses for such other products. Where any software is expressed to be compliant with local laws or requirementsin this document, such compliance is not a warranty and is based solely on Epicor's current understanding of such lawsand requirements. All laws and requirements are subject to varying interpretations as well as to change and accordinglyEpicor cannot guarantee that the software will be compliant and up to date with such changes. All statements ofplatform and product compatibility in this document shall be considered individually in relation to the products referredto in the relevant statement, i.e., where any Epicor software is stated to be compatible with one product and alsostated to be compatible with another product, it should not be interpreted that such Epicor software is compatiblewith both of the products running at the same time on the same platform or environment. Additionally platform orproduct compatibility may require the application of Epicor or third-party updates, patches and/or service packs andEpicor has no responsibility for compatibility issues which may be caused by updates, patches and/or service packsreleased by third parties after the date of publication of this document. Epicor® is a registered trademark and/ortrademark of Epicor Software Corporation in the United States, certain other countries and/or the EU. All othertrademarks 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 ofEpicor Software Corporation.

ED902905

90521-905-8799-583606

9.05.606

Revision: July 13, 2011 9:39 a.m.

Total pages: 64

course.ditaval

Page 3: Advanced.service.connect9

Contents

Advanced Epicor Service Connect 9.05 for Epicor ERP Course............................................6Before You Begin....................................................................................................................7

Audience.........................................................................................................................................................7

Prerequisites....................................................................................................................................................7

Environment Setup..........................................................................................................................................7

Workshop Constraints..............................................................................................................................9

Overview...............................................................................................................................10Epicor 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...................................................................................................................................14Test .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

3Epicor ERP | 9.05.606

ContentsAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 4: Advanced.service.connect9

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.6064

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseContents

Page 5: Advanced.service.connect9

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

5Epicor ERP | 9.05.606

ContentsAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 6: Advanced.service.connect9

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 Epicorapplication.

Service Connect supports specific collaborative processes, connecting different business entities, applications, orusers. Service Connect uses open, industry wide standards and technology that enables businesses to deploysolutions now, confident their investment will remain mainstream for the foreseeable future. Service Connectharnesses the power of XML, electronic message transfer, and processing environments to deliver reliabilitycombined with ease of use.

Service Connect supports a rich workflow environment where users can link individual workflows to businessevents, 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 logicunits into existing workflows to tailor them to customer needs. In Workflow Designer, the user can customize aworkflow 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.6066

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 7: Advanced.service.connect9

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 yourtraining environment. For more information on the modules available, contact your Epicor Customer AccountManager [email protected]. It is also important that you understand the prerequisite knowledge containedin 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 ofthe interface levels in the Epicor application - system, module, and program. Workshops focus on each ofthese levels and guide you through each navigational principle introduced.

• Database Concepts Course - This course reviews the table and field name identification process using FieldHelp, Customization Tools, and the Data Dictionary Viewer functionality. It also describes table linkingprocedures and requirements, Dataset Relationships Tracker features, and join type definitions and specifications.

• Business Process Management Course - This course focuses on the Business Process Management. BPMallows you to modify the flow of business processes through the application. This allows individual companiesto 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 EpicorService Connect and how to integrate it with the Epicor application. Service Connect is a powerful developmenttool that allows you to build workflows which can automate processes within an application or connectdifferent 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 successfullycomplete the workshops in this course.

Your Epicor training environment, in which the Epicor demonstration database is found, enables you to experienceEpicor 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.

7Epicor ERP | 9.05.606

Before You BeginAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 8: Advanced.service.connect9

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 yourEpicor training environment with the Epicor demonstration database installed. Do not completethe course workshops in your live, production environment.

Note It is recommended that multiple Epicor demonstration databases are installed. ContactSupport or Systems Consulting for billable assistance.

• The Epicor demonstration database is at the same service pack and patch as the Epicorapplication. Epicor's education team updates the Epicor demonstration database for each service packand 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 completingthe course workshops.

• Your system administrator restored (refreshed) the Epicor demonstration database prior tostarting this course. The Epicor demonstration database comes standard with parts, customers, salesorders, 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, productionenvironment) and is not periodically refreshed, unexpected results can occur. For example, if a courseworkshop 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 notrestored (refreshed), then you will not be able to ship the sales order. Epicor's education team has writtenthe course workshops to minimize situations like this from occurring, but Epicor cannot prevent usersfrom 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 yourtraining environment as a different user, from the Options menu, select Change User.

3. From the Main menu, select the company Epicor Education (EPIC06).

4. From the Main menu, select the Main Plant.

5. Epicor Service Connect 9.05 must be installed in your environment.

6. To perform the Workshop - Apply WSE 3.0 Server Policy, Web Services Enhancements (WSE) 3.0(Administrator mode) must be installed.

7. To perform the Workshop - Use Database Operation, ODBC driver to your Epicor application must beestablished.

Example Microsoft OLE DB Provider for ODBC Drivers or Microsoft OLE DB Provider for SQL Server.

8. To perform the Workshop - Call Service Connect Using Business Process Management, Business LayerTester must be installed in your environment.

To locate the installer of this tool, navigate to the Utilities folder of your Epicor 905 installation, for examplec:\Program Files\epicor\Epicor905\Utilities\BL-Tester.

For more information, contact your system administrator.

Epicor ERP | 9.05.6068

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseBefore You Begin

Page 9: Advanced.service.connect9

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

9Epicor ERP | 9.05.606

Before You BeginAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 10: Advanced.service.connect9

Overview

The Epicor Service Connect environment consists of various server files, tools, and Windows services that aremanaged, for the most part, by a Microsoft Management Console (MMC) snap-in called the Epicor ServiceConnect Administration Console. The Service Connect design environment consists of an application called theWorkflow 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 canbe 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. Otherformats are supported with the use of custom conversion plug-ins. All incoming documents are converted toa standard XML format referred to as the internal envelope. The parts of an XML document are referred toas nodes.

• Web Services - These are software components designed to support interoperable machine-to-machineinteraction 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 documentsfrom an application and optionally send documents to other applications. Channels that receive documentsare 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 datato another application, either by calling out to another application in the middle of the workflow or byproducing a new document at the end of the workflow. A workflow is represented in the Workflow Designeras a diagram that consists of various activities. Each activity performs a specific operation, such as transforminga 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 toperform 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 startto work with Epicor Service Connect (ESC), you need to ensure that IIS server is up and running, ESC host is

Epicor ERP | 9.05.60610

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseOverview

Page 11: Advanced.service.connect9

resolved into the IP address of your Service Connect server, and an internet connection is configured properly tovalidate .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 followingexample, scshost is resolved to the local IP address.

127.0.0.1 localhost127.0.0.1 scshost

During the Task Monitor installation, 'http://scshost' is added to Local Intranet sites. In Internet InformationServices (IIS) Server Manager, navigate to the Sites node and verify the host site is running. You can accessthis 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 addressesoption 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 licensedfunctionalities.

In Epicor Service Connect Admin Console, navigate to the Licenses > Features node to view licensed Businessand 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 ofusers 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 folderin 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 selectProperties. 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 Taskservice 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 nodeand select Properties.

On the General sheet, set up the server name and the database. Use the View options to specify the maximumnumber 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.

11Epicor ERP | 9.05.606

OverviewAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 12: Advanced.service.connect9

DES Service Properties

To configure Data Exchange Server Service properties, in the Epicor Service Connect Administration Consoletree, right-click the Connectivity node and select Properties.

In the DES Service Properties window, select the SQL Server name and Database name. In the Threadscount field, enter the maximum number of threads that can be used to batch process synchronous subworkflowiterations. 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 > .NETReferences node and select Properties.

The Cache Epicor sessions option defines whether to use a single instance of the Epicor.Mfg.Core.Sessionobject .NET reference calls with the same credentials and AppServer. The more Epicor .NET calls your systemperforms, the more tangible is the effect of this setting. The setting changes will be applied only after servicesrestart.

Tip You can restart all SC Services. To restart all SC Services, right-click the SC Service Manager icon inthe system tray and select the corresponding option. You can access this option from the Start menu, forexample, 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 Messengerservice.

Tip Select the Number of Messenger threads based on the number of channels and their sequentialproperty. The maximum thread count should be set to at least the number of channels marked asHigh-loaded + number of all the rest sequential channels + 1..3. If there are slow channels, such asPOP3 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 senderror 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 .NETCalls. To access this feature, in the Connectivity node, right-click the Workflow packages node and selectUpdate Processes. Use the wizard to implement desired changes.

Epicor ERP | 9.05.60612

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseOverview

Page 13: Advanced.service.connect9

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 > EpicorService 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 sourceworkflow.

13Epicor ERP | 9.05.606

OverviewAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 14: Advanced.service.connect9

Process

This section reviews advanced Service Connect techniques and contains workshops that guide you through theprocess.

Test .NET References

.NET Call allows you to use the standard workflow designer engine to call any method of any .NET objectregistered in a workflow. This feature allows you to extend the scope of the functionality within the workflowsand 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. Afteryou 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 existsin 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.

Epicor ERP | 9.05.60614

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 15: Advanced.service.connect9

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:

DataField

Enter your server name.AppServer

Enter your application port number, for example, 9001.Port

Enter a valid user, for example, manager.User

Enter a valid password for the user, for example, manager.Password

Enter a company, for example, EPIC06.Company

Enter a plant name, for example, MfgSys.Plant

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'smethods.

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 methodrequest.

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 callcontext information.

15Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 16: Advanced.service.connect9

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® 2005and the Microsoft .NET Framework 2.0 that enables developers to build secure Web services based on the latestWeb 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 configurationfile.

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 mustbe 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:\Program 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 installthe 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 isrunning. If the progress application server is on the same machine you are installing the services on, thenlocalhost 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.

Epicor ERP | 9.05.60616

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 17: Advanced.service.connect9

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.

17Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 18: Advanced.service.connect9

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 connectionfrom the Service Connect server machine to the Web Service. To test the service reference, use yourinternet 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.

Epicor ERP | 9.05.60618

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 19: Advanced.service.connect9

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.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <extension name="username" type="Microsoft.Web.Services3.Design.UsernameTokenProvider, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, 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.

19Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 20: Advanced.service.connect9

8. Click Close.

Epicor ERP | 9.05.60620

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 21: Advanced.service.connect9

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 SELECTstatement 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 datasynchronization.

• Read values from application databases "on the fly"; this can be useful if one or several fields are not returnedby 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 databaselookup. 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 stringthat 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,PartDescription9001-XXX,P9001,Part90019002-XXX,P9002,Part90029003-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.

21Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 22: Advanced.service.connect9

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 XXXare 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.

Epicor ERP | 9.05.60622

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 23: Advanced.service.connect9

The Channel configuration window displays.

7. Verify the Message properties sheet displays and select the following information.

ValueField

csv_sender_XXX (where XXX are your initials)SenderName

csv_import_XXXMsgType

updateAction

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.

ValueField

C:\channels\in\csvFile path

*.csvMask

csv2xml.dllConversion

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 selectNew.

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.

23Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 24: Advanced.service.connect9

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.

Epicor ERP | 9.05.60624

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 25: Advanced.service.connect9

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.

ValueField

Epic06CompanyID

Epic06Company

PTypeCode

EPricePerCode

EInternalPricePerCode

25Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 26: Advanced.service.connect9

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.

Epicor ERP | 9.05.60626

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 27: Advanced.service.connect9

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 purposeof this workshop is to create a database output based on part numbers the source .csv file provides. The assumptionis 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.

27Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 28: Advanced.service.connect9

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.

Epicor ERP | 9.05.60628

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 29: Advanced.service.connect9

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 SQLServer

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 Integratedsecurity option.

• To connect to a database that requires a username and password, select the Allow saving passwordcheck 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 passwordcheck 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 toNotepad. You need the Connection string to define the DB Lookup functoid parameters in the followingworkshop.

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

29Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 30: Advanced.service.connect9

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 FROMline:

FROM mfgsys.pub.part

This must be done due to syntax and database structure differences between MS SQL and Progress. If youare 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 Insertlink.

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.partWHERE (Company='EPIC06' and PartNum='Part')

12. In the SQL Statement window, click OK.

Epicor ERP | 9.05.60630

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 31: Advanced.service.connect9

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,PartDescription9011-XXX,P9011,Part90119012-XXX,P9012,Part90129013-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.

31Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 32: Advanced.service.connect9

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 lookupfunctoid will modify part descriptions of the existing parts based on a lookup query. As a result, the part descriptionsof 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, andrelease 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.

Epicor ERP | 9.05.60632

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 33: Advanced.service.connect9

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, andrelease 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.

33Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 34: Advanced.service.connect9

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 thedbLookup 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 PartDescriptionnode 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 supplythe 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.

Epicor ERP | 9.05.60634

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 35: Advanced.service.connect9

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 scenarioswhen 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 forthis 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 channelinformation to the MfgComment field in the Part business object. This information will be available for furtherprocessing 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.

35Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 36: Advanced.service.connect9

The Process properties window displays.

Tip Another way to access the window is to right-click in the empty workflow area and select ProcessProperties.

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.

Epicor ERP | 9.05.60636

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 37: Advanced.service.connect9

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 .xmloutput.

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 duringchannel plugin startup. The value macro provides by is unique and is shared between all communicationchannels.

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.

37Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 38: Advanced.service.connect9

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 businessprocesses.

Use the Sub-Workflow Properties window to set up a batch execution. This option is available only if you selectExecute synchronously on the General sheet. System administrators can elect whether to use this feature as itdepends 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 threadsfrom the number of Threads count set in the Epicor Service Connect Administration Console > Connectivitynode 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 parallelthreads.

At the beginning of the workshop, restore the connectivity settings and files linked to this course that are requiredto perform the test.

Important This task assumes you are working with the embedded version of this course, launched fromthe 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 bottomof this page contains a connectivity settings backup, window batch file, and .xml file that triggers the workflowexecution.

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.

Epicor ERP | 9.05.60638

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 39: Advanced.service.connect9

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 channelsettings 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 Namefield, select your server name. When asked to resolve name conflicts of already existing items, selectthe 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 toregenerate it. This task is necessary when a Web Service changes its interface. Use this option to automaticallyre-import a service reference.

Important If you are on a previous version than Epicor Service Connect 9.05.605, this option is notavailable and you have to re-import the service reference manually using the next task - Re-importthe Service Reference.

Tip You may use the Copy button to copy the list of restored items to a clipboard. Use the informationto 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.

39Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 40: Advanced.service.connect9

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 tomanually re-import the service reference. If the service reference was automatically re-imported in theprevious 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 thatany Epicor Service Connect workflow can be exposed as a standard Web Service and imported to EpicorService 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.

Epicor ERP | 9.05.60640

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 41: Advanced.service.connect9

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, createthis 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 create30 .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.

41Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 42: Advanced.service.connect9

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 firstputs 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 processingstatus.

If some of the processes are still running, press F5 to refresh the information and wait until all processesfinish.

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 requestimproves.

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.

Epicor ERP | 9.05.60642

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 43: Advanced.service.connect9

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 processesfinish.

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 asub-workflow. If an error occurs in any of the lines, you want the sub-workflow to stop looping instead ofprocessing the remaining lines.

43Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 44: Advanced.service.connect9

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. Looping is interrupted and the trace status is set to Complete.

2. Looping is interrupted and the trace status is set to In Progress.

3. 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 ofSub-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.

Epicor ERP | 9.05.60644

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 45: Advanced.service.connect9

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.

45Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 46: Advanced.service.connect9

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 FunctoidPalette.

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.

Epicor ERP | 9.05.60646

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 47: Advanced.service.connect9

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 conditionis 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 processfinishes.

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 thenew path.

Address any issues, if necessary.

In the following steps, you will modify the sub-workflow to stop looping once the condition is met.

47Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 48: Advanced.service.connect9

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 processfinishes.

Epicor ERP | 9.05.60648

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 49: Advanced.service.connect9

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 CycleConversion and Finish

• Looping is stopped, no more iterations are processed

Address any issues, if necessary.

49Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 50: Advanced.service.connect9

Service Connect and Business Process Management

Use the Service Connect and Business Process Management (BPM) functionality to call a Service Connect workflowfrom the Business Process Management module.

Use BPM to create workflows that automate, execute, and monitor business processes. The workflows, knownas directives, extend the base functionality of the Epicor application without requiring customizations or affectingyour ability to use future releases of the software. A directive is a set of conditions and actions associated witheither a business object method or a database table. If specified conditions are met, the actions execute. Tofurther 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 businessobject. 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 apart. If part information is updated, you want to be notified about the change in a demand record. Create a newmethod directive for a part business object that will call an Epicor Service Connect workflow. The workflowupdates 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, usethe 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 > GeneralOperations > 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. Whena 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.

Epicor ERP | 9.05.60650

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 51: Advanced.service.connect9

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 > GeneralOperations > 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 adifferent 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 businessobject.

51Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 52: Advanced.service.connect9

In this task, explore the demand entry business object and locate the <DemandContractNum> value the applicationassigns to the contract number you created. Obtaining this number is required for correct workflow executionin the following tasks.

Tip Use this tool when you build your Epicor Service Connect workflow to check the business objectstructure 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.

Epicor ERP | 9.05.60652

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 53: Advanced.service.connect9

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 importsuccessfully 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.

53Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 54: Advanced.service.connect9

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.

Epicor ERP | 9.05.60654

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 55: Advanced.service.connect9

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 thatcontains 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.

55Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 56: Advanced.service.connect9

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 DemandHeadnode.

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.

Epicor ERP | 9.05.60656

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 57: Advanced.service.connect9

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.

57Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 58: Advanced.service.connect9

Workshop - Create a Method Directive

In this workshop, create a method directive that calls the Epicor Service Connect workflow when part DSS-1010is 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 programfrom 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 applicationfrom 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 activatethe next directive, the application verifies the value has been reached. If it has been reached, theapplication throws an exception.

4. Click Save.

Add a Condition

1. In the Method Directives window, click the Conditions button.

Epicor ERP | 9.05.60658

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 59: Advanced.service.connect9

2. Click the Add Line icon.

3. In the User Text field, select the specified field of the changed row is equal to the specifiedexpression.

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 returnsin 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 validoption.

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).

59Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 60: Advanced.service.connect9

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 demandrecord 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 informationmessage, and Character02 contains the date and time information.

6. In the Trace Details window, click OK.

7. In the Activity Progress window, click OK.

Epicor ERP | 9.05.60660

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 61: Advanced.service.connect9

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 workflowexecution. 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 processand 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 componentcan 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 containmetadata 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. Itcan 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 beobserved separately. For each such operation there is a separate sequence of time slices, which is called atime 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 tracesand message traces.

• Start Message of Activity - This is a message that starts an activity. In general, the start message is not thesame 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.

61Epicor ERP | 9.05.606

ProcessAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 62: Advanced.service.connect9

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 fromthe 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 businessattribute 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. Inthe Document type field, select a document type from the list of pre-defined types. In the Documentfilter 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.

Epicor ERP | 9.05.60662

Advanced Epicor Service Connect 9.05 for Epicor ERP CourseProcess

Page 63: Advanced.service.connect9

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 athttp://www.keysurvey.com/survey/191084/2e21/ or by clicking the Course Evaluation link below. Your feedbackprovides the guidelines for the future direction of Epicor education.

63Epicor ERP | 9.05.606

ConclusionAdvanced Epicor Service Connect 9.05 for Epicor ERP Course

Page 64: Advanced.service.connect9

Additional information is available at the Education andDocumentation areas of the EPICweb Customer Portal. To access

this site, you need a Site ID and an EPICweb account. To create anaccount, go to http://support.epicor.com.