Posts

LBI Install Errors

Here is a simple solution for common LBI Install Errors.

 

Problem:

During an LBI install you get this error regarding a trigger name not the same collation as refencing column.

 

Resolution:

Run this query

IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[EJS_SIMPROP_TRIGGERS]’) and

                OBJECTPROPERTY(id, N’IsUserTable’) = 1)

                CREATE TABLE [dbo].[EJS_SIMPROP_TRIGGERS]

                                ( [SCHED_NAME] NVARCHAR(120) NOT NULL,

                                [TRIGGER_NAME] NVARCHAR(130) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,

                                [TRIGGER_GROUP] NVARCHAR(160) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,

                                [STR_PROP_1] NVARCHAR(512) NULL,

                                [STR_PROP_2] NVARCHAR(512) NULL,

                                [STR_PROP_3] NVARCHAR(512) NULL,

                                [INT_PROP_1] INT NULL,

                                [INT_PROP_2] INT NULL,

                                [LONG_PROP_1] BIGINT NULL,

                                [LONG_PROP_2] BIGINT NULL,

                                [DEC_PROP_1] NUMERIC(13,4) NULL,

                                [DEC_PROP_2] NUMERIC(13,4) NULL,

                                [BOOL_PROP_1] NVARCHAR(2) NULL,

                                [BOOL_PROP_2] NVARCHAR(2) NULL,

                                CONSTRAINT PK_EJS_SIMPROP_TRIG PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),

                                CONSTRAINT FK_EJS_SIMPROP_TRIG FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)

                                REFERENCES EJS_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP));

 

 

Start your install over and the same error should not repeat.

 

Creating custom IPA triggers using 4GL

With Infor Process Automation, there are several ways to trigger a Process. This article will discuss how to trigger a custom process using 4GL.

First, create your Process. Test it and upload it to the Process Server.

Next, in IPA Rich Client (or the LPA Admin tool), you must create a Service Definition (Process Server Administrator > Administration > Scheduling > By Service Definition) and attach a Process to it. There, you will configure any variables that should be passed to the process.

creating-custom-ipa-triggers-using-4gl

Now, let’s create the trigger in the 4GL program. This will be either a custom program your organization has created, or an existing Lawson form.

The first step is to initialize the WF SERVICE.

INITIALIZE WFAPI-INPUT

INITIALIZE WFAPI-OUTPUT

MOVE <serviceNameString> TO WFAPI-I-SERVICE

PERFORM 1000-WF-SERVICE

***Verify that the return code != 0 (anything other than 0 indicates error)

IF (WFAPI-O-RETURN-CODE NOT = ZEROS)

GO TO 600-END

Next, create the Work Unit

MOVE WFAPI-O-SERVICE TO WFAPI-I-SERVICE

MOVE <workTitleString> to WFAPI-I-WORK-TITLE

INITIALIZE WFAPI-OUTPUT

PERFORM 1000-WF-CREATE-SETUP

Now, populate your variables. You can have an unlimited number of variables per Service Definition, but you must populate them in groups of 10 (i.e. perform the 1000-WF-ADD-VAR-SETUP for each group of 10)

INITIALIZE WFAPI-INPUT

MOVE WFAPI-O-WORKUNIT TO WFAPI-I-WORKUNIT

MOVE “company” TO WFAPI-I-VARIABLE-NAME (1)

MOVE HR11F1-EMP-COMPANY TO WFAPI-I-VARIABLE-VAL (1)

MOVE “I” TO WFAPI-I-VARIABLE-TYPE (1)

MOVE “employee” TO WFAPI-I-VARIABLE-NAME (2)

MOVE HR11F1-EMP-EMPLOYEE TO WFAPI-I-VARIABLE-VAL (2)

MOVE “I” TO WFAPI-I-VARIABLE-TYPE (2)

INITIALIZE WFAPI-OUTPUT

PERFORM 1000-WF-ADD-VAR-SETUP

Finally, release the Work Unit

INITIALIZE WFAPI-INPUT

MOVE WFAPI-O-WORKUNIT TO WFAPI-I-WORKUNIT

INITIALIZE WFAPI-OUTPUT

PERFORM 1000-WF-RELEASE-SETUP