Custom Logic

Custom Logic

Custom logic is a function that allows you to put multiple Mapper logics together into a single logic and share it in Document Mapper and Variable Mapper.
Changes in the custom logic will be reflected in all the placed custom logics. Therefore, common conversion processings can be put together at one point, and this will improve development efficiency and prevent correction omissions compared to creating the same process at multiple points.

There are two types of custom logics, "Global custom logic" and “Local custom logic”.

Global custom logic can be used in all projects/scripts. You can use the same global custom logic in multiple projects, and this improves productivity especially in large-scale script development.
Since global custom logic is managed apart from the project, it can be migrated to another DataSpiderServer by exporting from server migration and you can use it as a common library.
The impact is large when you change or delete a global custom logic because it can be used in all projects/scripts. In such cases, you can easily check the range of impact and deployment destination by using "Find referrers".

Local custom logic can be used only within a single project. Use local custom logic when the custom logic is to be shared only within the project or to be managed together with the project.

Local custom logic cannot be migrated to global custom logic, and vice versa.

Global Custom Logic

  1. How to create
  2. How to edit
  3. Place on mapping canvas
  4. How to move/copy
  5. Find referrers
  6. How to delete
  7. Specification limits

How to create

  1. Open Mapper editor, and in the tool palette, right-click on "Global custom" palette and select [Add] - [Custom logic].
    Custom logic can also be classified by using group.
    Description of items
    Item name Description Remarks
    Add Custom logic Add a new global custom logic.  
    Group Add a new group.  

  2. Set the global custom logic name.
    Description of items
    Item name Description Remarks
    Custom logic name Enter the global custom logic name.  
    Comment Enter a comment.  

  3. A new global custom logic will be created and displayed in the tool palette.

How to edit

  1. Double-click the global custom logic in the "Global custom" palette of the tool palette and open the global custom logic editor.
    You can also open it by double-clicking the global custom logic icon on the mapping canvas.


  2. Select [Create new handler] from the right-click menu of the input source root element (input handler).
    Description of items
    Item name Description Remarks
    Create new handler Add an input handler.  

  3. Set the input handler name.
    Description of items
    Item name Description Remarks
    Handler name Enter the input handler name.  
    Comment Enter a comment.  

  4. Place a Mapper logic onto the canvas from the tool palette and create the mapping of global custom logic.
The handler name and comment can be edited from [Edit] in the right-click menu of the created input handler.
The handler can be deleted from [Delete] in the right-click menu of the created input handler.
The output handler is handled same as normal logics, so the output will be of one type. Therefore it cannot be edited.

Notes

Place on mapping canvas

Drag and drop a global custom logic onto the mapping canvas from the "Global custom" palette in the tool palette.
All input/output types are string type.

How to move/copy

Move

  1. Click [Cut] from the right-click menu of global custom logic in the "Global custom" palette of the tool palette.
  2. Click [Paste] from the right-click menu in the destination (a group or an empty space in the "Global custom" palette).
    It cannot be moved to the same hierarchy.
    If a global custom logic of the same name exists in the destination, an underscore and number will automatically be appended at the end of the global custom logic name.

Copy

  1. Click [Copy] from the right-click menu of global custom logic in "Global custom” palette of the tool palette.
  2. Click [Paste] from the right-click menu of a group or in an empty space in the "Global custom" palette.
    If a global custom logic of the same name exists in the destination, an underscore and number will automatically be appended at the end of the global custom logic name.

Find referrers

Find referrers is a function to find the Mappers using the global custom logic.
  1. Click [Find referrers...] in the right-click menu of global custom logic in the "Global custom” palette of the tool palette.
  2. "Find referrers" dialog will open.
    Information of Mappers which refers to the global custom logic (from which the right-click menu was opened) is displayed.
    Projects and services which you don't have permission to read are not be displayed.

    Description of items
    Item name Description Remarks
    Project Project Project name in which the logic is used.  
    Script Script name in which the logic is used.  
    Mapper Component icon name of the Mapper in which the logic is used.  
    Layer Layer name of the Mapper in which the logic is used.  
    Comment Comment of the logic.  
    Service Service Service name in which the logic is used.  
    Script Script name in which the logic is used.  
    Mapper Component icon name of the Mapper in which the logic is used.  
    Layer Layer name of the Mapper in which the logic is used.  
    Comment Comment of the logic.  

  3. Select a row in [Mapper list] and click [Open Mapper] to open the Mapper editor in which the logic is used. At that time, the logic will be selected.
    When the same global custom logic with the same comment is multiply placed in a layer, all the logics will be selected.

How to delete

Click [Delete] from the right-click menu of global custom logic in the “Global custom” palette of the tool palette.
When you delete a global custom logic, scripts and services referring to that logic will be inexecutable. Be sure to check the range of impact in “Find referrers” before deleting.
When deleting a global custom logic, placed global custom logics referring to the logic may not be removed immediately. In that case, re-open the project.

Specification limits

Local Custom Logic

  1. How to create
  2. How to edit
  3. Place on mapping canvas
  4. How to delete
  5. Specification limits

How to create

  1. Open Mapper editor, and in the tool palette, right-click on "Local custom" and select [Add] - [Custom logic].
    Custom logic can also be classified by using group.
    Description of items
    Item name Description Remarks
    Add Custom logic Add a new local custom logic.  
    Group Add a new group.  

  2. Set the custom logic name.
    Description of items
    Item name Description Remarks
    Custom logic name Enter the local custom logic name.  
    Comment Enter a comment.  

  3. A new local custom logic will be created and displayed in the tool palette.

How to edit

  1. Double-click the local custom logic in the "Local custom" palette of the tool palette and open the Mapper editor.
    You can also open it by double-clicking the local custom logic icon on the mapping canvas.


  2. Select [Create new handler] from the right-click menu of the input source root element (input handler).
    Description of items
    Item name Description Remarks
    Create new handler Add an input handler.  

  3. Set the input handler name.
    Description of items
    Item name Description Remarks
    Handler name Enter the input handler name.  
    Comment Enter a comment.  

  4. Place a Mapper logic onto the canvas from the tool palette and create the mapping of local custom logic.
Increase/Decrease of input handlers will be reflected also in local custom logic icons placed on the mapping canvas. When an input handler is removed, the link attached will also be removed at the same time.
The output handler is handled same as normal logics, so the output will be of one type. Therefore it cannot be edited.
The handler name and comment can be edited from [Edit] in the right-click menu of the created input handler.
The handler can be deleted from [Delete] in the right-click menu of the created input handler.

Place on mapping canvas

Drag and drop the local custom logic onto the mapping canvas from the "Local custom" palette in the tool palette.
All input/output types are string type.

How to delete

Click [Delete] from the right-click menu of local custom logic in the “Local custom” palette of the tool palette.
When deleting a local custom logic, placed local custom logics referring to the logic may not be removed immediately. In that case, re-open the project.

Specification limits