---
title: "Integration Framework"
author: "kirenenko04"
date: "2014-07-29T12:15:17Z"
tags: []
categories: ["编程语言"]
slug: "integration-framework"
draft: false
lastmod: "2014-07-29T12:16:44Z"
id: 2097759
url: "https://kirenenko04.iteye.com/blog/2097759"
---

Integration Framework

**集成框架**

The growing complexity of the batch processes required to operate a shop, have brought in some cases the existing implementation to its limits. On the one hand side because of the growing number of batch components (Jobs) and on the other hand due to lacking **monitoring** and **notification** capabilities.

日益增长的批处理执行于一个商店，带来了某些情况下实现的局限性，一方面因为Jobs数据增长，另一方面因为缺少监控和通知功能。

 

This concept（概念） will define a general way how **workflows** and its components（组件） need to be built so that a common infrastructure can provide facilities for monitoring（监控工具）, logging（日志）, configuration（配置）, scheduling（计划任务） etc. One such framework which allows us to do so is Integration Framework. It is nothing but a combination of cartridges（组合cartridges）, preferences（参数设置）, custom objects (自定义对象) and meta-data which together can help create a workflow and monitor it. The first step towards using Integration Framework is **installing** it.

 

 

**General concept 基本概念**

Every workflow that needs to be executed is modelled as a WorkflowSchedule （工作流程安排）, containing main information about **frequency**, **run times**, **enablement**, **file log level**, etc.

 

Every WorkflowSchedule consists of  Simple **WorkflowComponentInstances** (created from the existing **WorkflowComponentDefinitions**), describing the **steps** within the workflow and their **individual** **configurations**

 

For recurring（循环） schedules the schedule itself and its components are **cloned** for each schedule run.

 

In Demandware platform terminology, a **WorkflowSchedule** consists of a custom object defining the **workflow** and a number of **job schedule definitions** in the Demandware BM which check for workflows to execute on a regular basis. Every **WorkflowComponentInstance** relates to []()[]()**WorkflowSchedule**objects as well.

在Dw平台中，一个**WorkflowSchedule由一个自定意义对象定义的workflow** 和许多个**job schedule definitions** （用于检查workflow定期执行）在DW BM中，每一个**WorkflowComponentInstance**同样关联到**WorkflowSchedule**对象.

 

**Scheduled Job Configuration**

**Standard Demandware jobs** are used to **trigger** the workflow engine. **All other** calculation is done by the **framework** itself. This allows for example the displaying of upcoming workflows even days in advance.

 

*To setup a scheduled-Job:*

1\. Navigate to **Administration** -&gt; **Operations** -&gt; **Job Schedules**

2\. Create a **new** or **edit** an old Schedule

3\. Set the Execution **Scope** to either ‘*Sites’* or ‘*Organization’* depending on the Scope your **pre-defined** **Workflow-Schedule** run in. *If your Workflow-Schedule should run in both scopes, please create a Scheduled-Job for each Scope.*

4\. Make sure that pipeline ‘**Workflow’** and start node ‘**Start’** are already pre-configured.

5\. The Provided parameter‚ **JobId**, associates to **a** workflow component with the job which triggers the frameworks processing engine. This **JobId** is used internally by the Workflow pipeline to be able to identify the job that invoked it.

 

**Monitoring**

A monitoring **cockpit(****驾驶舱)** allows viewing the schedule of the current day as well as the schedule for a given date. For the **selected** day a list of Workflows that are scheduled is shown as well as their components are shown. All of them state their name, the current status and the status message.

 

**List of out of the box components**

 

**Component**

**Description**

Standard Components Import

标准组件导入

The component  allows importing *any* **system** or **custom** object from a **designated local** or **remote directory** (relatively to IMPEX/) via XML-Files which corresponds (符合) to a specific naming pattern.

**Standard Components-Download Files**标准组件下载文件

Allows you to **import from** a designated **WebDAV or(S)FTP** location into Demandware

**Catalog export**

目录导出

allows **exporting of a**

**specific Catalog**

into a designated local directory (relatively to IMPEX/).

**Order export**

订单导出

allows **exporting** orders

(**all** or **confirmed** and **paid**) to a designated local directory

(relatively to IMPEX/).

**Price-Book export**

价格本导出

allows **exporting** of a

**specific Price Book**

into a designated local directory

(relatively to IMPEX/).

**Price import**

**价格导入**

allows **importing** **Price-**

**Books** from a *designated local directory* (relatively to

IMPEX/) via XML-Files

which corresponds to a specific

naming pattern.

**Import slots**

**导入slots**

allows **importing** of

**content slot configurations** from a *designated local*

*directory* (relatively to IMPEX/) via XML-Files which corresponds to a *specific naming pattern* in a specified mode.

**Import content**

**导入content**

allows **importing** of

**data** from a *designated local directory* (relatively to

IMPEX/) via XML-Files

which corresponds to a specific

naming pattern into a specified library and in a specified mode.

**Various Rebuild functionality**

**各种重建功能**

To rebuild Search / Availability / ActiveData / Redirect

/ Suggestions / Synonyms Indexes

**Time condition**

**时间控制**

allows ensuring that

the workflow will not be continued in case a configured

time is in the past or that the execution will be put on

hold until a certain time is reached. This can be useful in

case a replication or other workflow needs to happen

before a certain point of time in order to not impact the

production system performance.

确保当配置时间已经过期时候workflow不会被继续执行直到一个特定时间到达，这个对复制或者其他workflow是有用的，可以不影响正式环境系统的性能，

**Date condition**

**日期控制**

ensuring that the

workflow will not be continued in case a configured date is in the past or that the execution will be put on hold until a certain date is reached. This can be useful in case a replication or other workflow needs to happen before a certain date in order to not impact the production system performance

**Date-Time condition**

**日期-时间控制**

allows ensuring that the workflow will not be continued in case a

configured date and time is in the past or that the execution will be put on hold until certain date and time are reached. This can be useful in case a replication or other workflow needs to happen before a certain time in a certain day in order to not impact the production system performance.

**Workflow clean-up**

**Workflow的清理**

allows the removal of old custom objects which were created through the workflow framework.

清理旧的自定义对象，一些已经执行过的workflow

**Clean-up files**

**清理文件**

allows the removal and archive of old files in specific folders

清理和归档旧文件，在指定目录

**Transfer to FTP**

**传送到ftp**

allows the copy of files

from a local directory (relatively to IMPEX/) to a FTP-Location

允许从本地目录复制到ftp目录

**Transfer from FTP**

**从FTP传送**

allows the copy of files to a local directory (relatively to IMPEX/) from a FTP-Location.

允许从ftp复制文件到本地目录

**Rebuild indexes**

**重建索引**

Allows the rebuilt of the configured indexes. This component can be useful after the import of a catalog for example.

允许常见配置索引，组件可以对导入商品数据之后有用。