Skip to main content
Skip table of contents

InvocationServlet

General information about using the InvocationServlet

The InvocationServlet offers a simple way to issue commands for the application server.

The call is performed schematically in a browser as follows:

Calling the InvocationServlet
CODE
https://<FQDN des ServerNamens>:<Portnummer der Installation>/invocation/InvocationServlet?job=<JobToDo>

After the application server was contacted, it is necessary for a user abbreviation (in capital letters) and the affiliated password are transferred.

FQDN from the server name

At this point, the full qualified domain name of the server must be entered.

In the following examples, we will use the names of the server myServer in the myDomain.de domain, which results in the FQDN myServer.myDomain.de.

Port number from the installation

The JBoss application server can be defined for different port ranges.

The port range can be viewed in the application server in the file standalone.conf.bat under the name JBOSS_PORT_RANGE.

For our examples, we assume that in standalone.conf.bat you will find

set JBOSS_PORT_RANGE=10

Now the “installation port number”is calculated in our examples as follows:

(JBOSS_PORT_RANGE * 1000) + 8443 = 18443

isApplicationDeployed

This call can be used to check if the application server has started and the application is accessible.

Call via a web browser by entering the URL

Example for the simple job "isApplicationDeployed"
CODE
 http://myServer.myDomain.de:18443/invocation/InvocationServlet?job=isApplicationDeployed

(Warnung) Note 1:
I the application is not yet on the deployed application server, you will receive an error message stating that the site is not available. Otherwise you will receive a confirmation page

CODE
CARMEN 1.0
Job name: isApplicationDeployed
...
Job done OK
Bye!  

(Warnung) Note:

It must be considered that this message is successful once the InvocationServlet has started. It is therefore not yet certain that the main application has already started completely; this may result in small delays.

Deleting non-system and customizing data (cleanTables)

Objective

The data that was not defined as system or customizing data should be removed from a system. All movement and internal data will therefore be deleted.

Precondition

  1. The system may not be identified as a production system in the PropertyMapper (see Security Entry in PropertyMapper).

  2. The entry with the id = ‘/de/cursor/jevi/server/system/TableController$!!$HandleAsCustomizingTable’/de/cursor/jevi/server/system/TableController$!!$HandleAsCustomizingTable’ must be checked in the PropertyMapper.
    In this entry additional tables can be stored. These tables are evaluated as tables with the content type Content: Customizing.

  3. If the data quantity is very large, the entry with the id = ‘/de/cursor/jevi/server/business/businesslogic/TransactionWrapper$!!$TimeOutCleanTables’/de/cursor/jevi/server/business/businesslogic/TransactionWrapper$!!$TimeOutCleanTables’ must be checked or adjusted in the PropertyMapper.
    In this entry, the transaction duration can be extended. If the entry is not present, the transaction duration amounts to 3600 sec (1h).

  4. A valid system administrator must be configured in the CRM system.

  5. A data backup exists.

  6. No more users are logged into the system

Definition system administrator
A system administrator must

  • be able to configure all areas of the application

  • have at least read rights for all fields from the application.

This applies to the TECH_USER during the delivery of the CRM system.

Postcondition

Only system and customizing data is available in the system.

Postcondition (in case of error)

If an error occurs, no changes are made to the data

ORACLE
Under ORACLE, the database can be locked again so that a new attempt results in the failure java.sql.SQLException: ORA-00054: Resource occupied and requirement with NOWAIT specified or timeout expired
running. In this case, you either have to wait long enough or the Oracle instance must be restarted.

Main mask

An employee from CURSOR Software AG or other trained people with a login as:

  • System administration in the production system exclusively before the production process.

  • System administrators in the test system.

  • System administrators in the consolidation system.

Triggering event

The only way to start is currently via the InvocationServlet.

Standard procedure

1.

Call via a web browser by entering the URL

Example
CODE
https://myServer.myDomain.de:18443/invocation/InvocationServlet?job=cleanTables

2.

You must log on to the application server with a system administrator user.
The abbreviation shall be entered in capital letters
The associated password for the shortcut must be entered in plain text

3.

The website is created at the runtime of the action. If the system is still identified as “productive”, this results in the following output

CODE
CARMEN 1.0
Job name: cleanTables
...
This action is not allowed for a system of type production system
The type of the system can be set by the PropertyMapper using id '/de/cursor/jevi/server/system/SystemInfo$!!$Systemtype'

No changes are done.

Bye!  

Alternative procedure

The files mentioned are included in the scope of delivery in the tools\LuceneIndex directory.

1.

Configuration of the file InvocationServlet.bat (only required during setup)

2.

Call the InvocationServlet.bat file with the cleanTables parameter
If this batch file is used, the program wget64.exe is also necessary.
Both files are not delivered in the default.

3.

The result can be found in the log file <internal product name>_invocator.log.

Configuration of this function

Defining entities that should not be emptied

Entity configuration

If a C2 entity is flagged with Contains Customizing, this entity is not cleared.

PropertyMapper

Through the admin console, a new entry can be created in the Customizing - Advanced Settings (application parameters) with the ID /de/cursor/jevi/server/system/TableController$!!$HandleAsCustomizingTable.

A list of entities can be entered as a value, which are defined as tables with customizing content. The separator is $!!$.

The existence of the entities in the system is verified, and you must ensure that they are case sensitive.
Example:
C2TEST1$!!$C2TEST2 defines the two tables C2TEST1 and C2TEST2 as tables with Customizing contents

Only tables should be considered that have Content: Internal or Content: Movement Data saved as the content type (see below regarding the content type). The tables from the personal environment are an exception to this; they are already treated separately.

The entities saved in this entry are observed as tables from the content type Content: Customizing and treated correspondingly.

Removal of the deletion lock

A PropertyMapper entry exists in the delivery with id = '/de/cursor/jevi/server/system/SystemInfo$!!$Systemtype'. This entry has the value ‘production system ’production system’ and should prevent the function from being accidentally executed on the system.

If this value is changed on one of the others with an SQL Editor, this system is no longer viewed as “productive” and this may be followed by emptying.

SQL
UPDATE PropertyMapper SET propertyValue = 'test system' where id = '/de/cursor/jevi/server/system/SystemInfo$!!$Systemtype'

The server cache from the application server must be emptied after changing configuration data via SQL.

Change transaction time

  • PropertyMapper entry with id = '/de/cursor/jevi/server/business/businesslogic/TransactionWrapper$!!$TimeOutCleanTables’

Example (ORACLE syntax) for the logging of the PropertyMapper entry with id = '/de/cursor/jevi/server/business/businesslogic/TransactionWrapper$!!$TimeOutCleanTables’:

SQL
INSERT INTO PropertyMapper (Pk, id,
propertytype, property, principal, propertyvalue,
CustLayer, Active, MassData, OfflineData, WFInstanceId, RightPk, CreateUser, UpdateUser, CreateDate, UpdateDate)
VALUES ('SYSTEM.TimeOutCleanTables','/de/cursor/jevi/server/business/businesslogic/TransactionWrapper$!!$TimeOutCleanTables',
'SYSTEM', '', '', '3600',
'CN', 1, 0, 0, '#EMPTY-KEY#', 'RIGHTTEMPLATE', 'TECH_USER', 'TECH_USER', sysdate, sysdate)

The transaction time can be entered in the PropertyValue field for emptying data. The standard value for this entry amounts to 3600 sec (= 1h) if it does not exist.
The server cache must be emptied after transmitting the SQL statement to allow the setting to be activated.

Which data will be deleted?

All tables that have content classified as movement data or internal data are emptied (exception due to technical reasons: the table EmployeeLog).
All of the link tables belonging to these tables are emptied.

A special treatment is carried out for the tables from the personal environment.
This includes the tables:
Address, ContactPerson, Customer, Employee, Person, Telecom, rCoPeAd, rCuAd und rEmAd

These tables are only partially emptied. All datasets with a personal dataset that fulfills one of the following conditions remain in the system:

  • The personal dataset belongs to the system owner (defined via the PropertyMapper id = ‘SYSTEMOWNER’

  • Te personal dataset has an active employee role (an active dataset in the Employee table)


Al entries from the PropertyManager are deleted with the PropertyType = “USER”.

Information about the content type from the tables can be found in the client in the directory <installation directory>\jboss\conf in the file FieldReport.csv.

Tip

It is recommended to import this csv file in Excel (tabulator is the separator) and obtain the rows via a filter that started with the text Content:.

indexUnindexed

With this call, the data indexing can be triggered in the UnindexedEntity. Normally this start is performed via the “Refresh search index” timer and should no longer be necessary.

Example for the simple job "indexUnindexed"
CODE
http://myServer.myDomain.de:18443/invocation/InvocationServlet?job=indexUnindexed

optimizeIndexes

With this call, the optimization function of the Lucene library can be started. This function, however, is still necessary in the rarest of cases; it is a relic from former releases of the Lucene library.

Example for the simple job “optimizedIndexes"
CODE
http://myServer.myDomain.de:18443/invocation/InvocationServlet?job=optimizeIndexes

createIndex

Calling Lucene indexing of all entities

With this call, the indexing of the entities can be started. If the call is performed without further parameters, all entities will be indexed (analog to the click on the “Create All” button in the admin console under the area Search - Juhuuu).

Example for the job "createIndex"
CODE
http://myServer.myDomain.de:18443/invocation/InvocationServlet?job=createIndex
Calling Lucene indexing of certain entities


The job can still be extended by the tables parameter. Entity names can then be specified separated by commas, which are added to the Lucene indexing.

Example for the “createIndex” job with the tables parameter
CODE
http://myServer.myDomain.de:18443/invocation/InvocationServlet?job=createIndex?tables=activity,customer,contactperson,isApplicationDeployed

In the output from this example, you can see which entities are being indexed. All incorrect table names will be ignored (here isApplicationDeployed).

Result from the example call
CODE
CARMEN 1.0
Job name: createIndex?tables=activity,customer,contactperson,isApplicationDeployed
...
for entities: 
create new Lucene index for Customer
create new Lucene index for Activity
create new Lucene index for ContactPerson

Job done OK
Bye!  

clearCaches


With this call, the emptying of the application server cache is triggered.

Example for the simple job “clearCaches"
CODE
http://myServer.myDomain.de:18443/invocation/InvocationServlet?job=clearCaches

clearGroupsAndRightsCache


With this call, the emptying of the groups and rights caches from the application server is triggered.

Example for the simple job "clearGroupsAndRightsCache"
CODE
http://myServer.myDomain.de:18443/invocation/InvocationServlet?job=clearGroupsAndRightsCache

deleteOldHistory

This call is analog to clicking on the “Clear internal document backups” button in the admin console under the area Document integration - Manage document directories.

Old internal backup copies are deleted from the history directories of the document management.

Example for the job "deleteOldHistory"
CODE
http://myServer.myDomain.de:18443/invocation/InvocationServlet?job=deleteOldHistory

getRightFunction

With this call, you receive a simple overview of the currently configured field and action rights from the application.

Example for the job "getRightFunction"
CODE
http://myServer.myDomain.de:18443/invocation/InvocationServlet?job=getRightFunction

Shortened output from the function call

CARMEN 1.0

FieldRights

Address

Field rights default

Group

Read

Write

Manage

Confidential Field

ADMINISTRATION

true

true

true

true

DEFAULT

true

true

false

false

GUEST

true

false

false

false

USERS

true

true

false

false

  • Active.Address

  • AddressCustomerKey.Address

  • AddressKey.Address

  • AddressType.Address

  • City.Address

  • ClientNo.Address

  • CoName1.Address

  • CoName2.Address

  • CoName3.Address

  • Community.Address

  • ComposedAddress.Address

  • CountryKey.Address

  • CreateDate.Address

  • CreateUser.Address

  • DefaultCoPeAd.Address

  • DefaultCuAd.Address

  • DefaultEmAd.Address

  • District.Address

  • ExtCompAddress.Address

  • Freeboolean1.Address

  • Freeboolean10.Address

  • Freeboolean11.Address

  • Freeboolean12.Address

  • Freeboolean13.Address

  • Freeboolean14.Address

  • Freeboolean15.Address

  • Freeboolean2.Address

  • Freeboolean3.Address

  • Freeboolean4.Address

  • Freeboolean5.Address

  • Freeboolean6.Address

  • Freeboolean7.Address

  • Freeboolean8.Address

  • Freeboolean9.Address

  • Freedate1.Address

  • Freedate2.Address

  • Freedate3.Address

  • Freedate4.Address

  • Freenumber1.Address

  • Freenumber2.Address

  • Freenumber3.Address

  • Freenumber4.Address

  • Freetext1.Address

  • Freetext10.Address

  • Freetext11.Address

  • Freetext12.Address

  • Freetext13.Address

  • Freetext14.Address

  • Freetext15.Address

  • Freetext16.Address

  • Freetext17.Address

  • Freetext18.Address

  • Freetext19.Address

  • Freetext2.Address

  • Freetext20.Address

  • Freetext3.Address

  • Freetext4.Address

  • Freetext5.Address

  • Freetext6.Address

  • Freetext7.Address

  • Freetext8.Address

  • Freetext9.Address

  • GeocodeState.Address

  • IsDefault.Address

  • Lat.Address

  • LetterCoPeAd.Address

  • LetterCuAd.Address

  • LetterEmAd.Address

  • LetterheadAddition.Address

  • Lng.Address

  • LocationPk.Address

  • MassData.Address

  • NameKey.Address

  • OfflineData.Address

  • PersonPk.Address

  • Pk.Address

  • RelationPKrCoPeAd.Address

  • RelationPKrCuAd.Address

  • RelationPKrEmAd.Address

  • ReplaceCoFields.Address

  • RightPk.Address

  • State.Address

  • StateDesc.Address

  • Status.Address

  • Street.Address

  • StreetNumber.Address

  • StreetNumberAddition.Address

  • UpdateDate.Address

  • UpdateUser.Address

  • WFInstanceId.Address

  • ZIPKey.Address

...

Function rights

edit.keys.permissionAdmin, FachAdmin rights for function rights

Group

Read

Write

Manage

Confidential Field

ADMINISTRATION

true

true

true

true

logonToEachLayer.permission Login in all layers

Group

Read

Write

Manage

Confidential Field

ADMINISTRATION

true

true

true

false

...

getRightForPKFunction

With this function, you can output the rights groups and user codes that are set to a certain dataset.
(Warnung) Note: With the tool wget the call cannot be done correctly, because the & is not processed correctly. However, with the batch InvocationServlet.bat the correct URL can be generated and executed via a browser.

The table and pk parameters must be transferred.

Example for the job "getRightForPKFunction"
CODE
http://myServer.myDomain.de:18443/invocation/InvocationServlet?job=getRightForPKFunction&table=Activity&pk=1snf74h1bl0lsgtuAc

Output of the rights for the dataset from the activity entity with the Pk '1snf74h1bl0lsgtuAc'

CARMEN 1.0

Right

1snf74h1bl0lsgtuAc

Template: DefaultTemplate

Group

Read

Write

Manage

Confidential Field

ADMINISTRATION

true

true

true

true

DEFAULT

true

true

true

false

GUEST

true

true

false

false

USERS

true

true

false

false

ADMINISTRATION

  • ADMIN

  • TECH_USER

DEFAULT

  • APE

  • ADMIN

  • DEFAULT

  • SMO

  • USER

  • FACHADMIN

  • EMH

GUEST

  • GUEST

USERS

  • USER

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.