Developing software components
To develop a software component:
- Open an activity To open an activity in the LN Studio:
- Open the Application perspective: Select . Select Application from the list and click .
- In the Activity Explorer, right-click and select . The Open an Activity dialog is displayed.
- Select your software project from
the list and click Next. The Select
Activity page is displayed. The first time you open an activity for the
selected project, you are prompted to configure the project's dynamic
Connection
Points. See Defining dynamic connection points.
Select your
activity from the list and click Finish.
The activity is now displayed in the Activity Explorer. A tree structure of the packages and the corresponding software components on the LN server is displayed in the Component Explorer. You can use this tree structure to link software components to your activity.
- Create a new component or
link an existing component to your personal activity
Once you have opened a personal activity in the LN Studio, you can create a new software component, or link an existing component to your activity.
To create a new component, in the Activity Explorer, right-click and select . The Create a New Infor LN Software Component wizard starts. Use this wizard to define the basic properties for the new component. The created component appears in the Activity Explorer of the Application perspective.
See Create a New Infor LN Software Component wizard.
To link an existing component to your activity, complete one of these steps:
- Expand the relevant folders in the tree structure in the Component Explorer and select one or more software components. Then double-click the selected components, or right-click and select . The components are now displayed in the Activity Explorer.
- In the Activity Explorer, select an activity and, on the LN Studio toolbar, click . The Select Component(s) dialog starts. Find the desired components and click to add the components to your activity.
- See Select Component(s).
When you add a component to an activity, the corresponding editor can start automatically for the component. This depends on your workbench preference settings.
See the description of the Preferences - Workbench dialog.
Note: You can also add a component to an activity, and open it in the corresponding editor, while editing another component. For example, you can do one of the following:- Use the
Script Editor to open the component you selected in the
source code.
See Open Declaration.
command in the - Click a hyperlink in a multipage editor to open the corresponding component. For example, click the Label Code hyperlink in the Session Editor to open the label that contains the session description.
- Check out the component The check out process locks the software component for other developers. During the check out phase, the component can be updated and tested.
To check out a component:
- Right-click the component in the Activity Explorer.
- Select
Alternatively, in the Application perspective's toolbar, click .
.
- Edit the component
Double-click the component in the Activity Explorer to start the corresponding editor.
For example:
- Double-click a session to edit the session in the Session Editor.
- Double-click a table to edit the table in the Table Editor.
For details on the LN Studio editors, see Multipage Editors and Script Editor.
Perform the required changes and, when finished, save the changes and close the editor.
Note: If you try to change a component, which is not yet checked out, you are prompted to check out the component. - Build the component
By default, the component is built (compiled) automatically every time it is saved. Error messages and warnings generated by the compilation process, if any, are displayed in the Problems view.
To disable/enable the automatic compilation, turn off/turn on the
command in the menu.If automatic compilation is disabled, you must start the compilation process in the following way:
- Select the component in the Activity Explorer.
- Select .
- Solve error messages
Solve all errors that are detected by the compilation process.
Note: Double-click an error message in the Problems view, to open the component involved. If you double-click a source code error, the source is opened at the corresponding line. - Run/debug the component
To test the changes to a component, you can launch a session, in which the component is used, from the workbench. For example:
- To test the changes to a report, launch the session to which the report belongs.
- To test the changes to a table, start a session that operates on the table. For example, to test changes in the Employees - General (tccom001) table, launch the Employees - General (tccom0101m000) session.
You can launch sessions in either run or debug mode:
- In run mode, the
session executes, but you cannot suspend or examine the execution.
See Running LN sessions.
- In debug mode, you can suspend and resume the execution, inspect variables, and evaluate expressions.
Note: You can only launch sessions that belong to the packages displayed in the Component Explorer - Check in the component The check in process releases the checked out software component and also stores a historical version.
To check in a component:
- Right-click the component in the Activity Explorer.
- Select
Alternatively, in the Application perspective's toolbar, click .
.
-
End Activity
To end an activity:
- Right-click the activity in the Activity Explorer.
- On the shortcut menu, select Activity Overview, End Activity dialog starts. , and subsequently click . The
- To end the entire
activity, select all components and click LN Studio moves the components from the Activity VRC to the
Project VRC, so
that the components become available to other software engineers. The
selected components are compiled automatically. The activity disappears from
the Activity Explorer.
Note:
- The automatic
compilation fails, if a component in your activity calls an uncompiled
component in another activity. The activity is closed anyway. When the
problem that caused the compilation error is solved, you can recompile
the closed activity in the Software Project
Explorer. See the following example:
- Activity B is part of the context of activity A. A UI script in activity A calls a DLL that belongs to activity B. The DLL is not compiled yet.
- Activity A is ended by its owner. The compilation of the UI script fails, because the DLL in activity B is not compiled. Activity A is closed anyway.
- Activity B is ended by its owner. The DLL is compiled automatically and the activity is closed.
- To recompile the closed activity A, the owner of activity A goes to the Software Project Explorer and runs the command.
- If the Partial End Allowed check box in the software project properties is selected, you can partially end the activity. To do this, in the Activity Overview, End Activity dialog box, select a subset of the components and click . See the dialog box's online help.
- If you run and debug sessions in Web UI, the corresponding form definitions are stored in the form cache on the Web UI server. To recover disk space on the Web UI server, it is recommended to remove these old forms after the activity is closed. The Web UI administrator can remove these forms via the Remove Obsolete Forms page in the Web UI Administration Console. For details, see the Infor Enterprise Server Web UI Installation and Configuration Guide.
- You can only end an activity, if the previous activity is delivered. Otherwise the End Activity action is blocked.
. - The automatic
compilation fails, if a component in your activity calls an uncompiled
component in another activity. The activity is closed anyway. When the
problem that caused the compilation error is solved, you can recompile
the closed activity in the Software Project
Explorer. See the following example:
- Deliver the software
components
The components in the activity are now ready for delivery.
If the PMC integration is enabled, you are prompted to deliver the activity and create a PMC solution. Complete one of these steps:
- To generate and deliver a solution in one go, click in the question window.
- To manually create and deliver a solution, click .
If the PMC integration is not enabled, manually create and release a solution through the PMC sessions on the LN server.
For details on the delivery process, see Delivering software components.