Framework:MakroExecutor: Difference between revisions

From CoPlanner 11
Jump to navigationJump to search
Created page with "__TOC__ ==Beschreibung== Der MakroExecutor dient dazu, um ohne einen CoPlanner Client geöffnet zu haben, Makros ausführen zu können. Der Aufruf erfolgt ..."
 
No edit summary
 
(10 intermediate revisions by one other user not shown)
Line 1: Line 1:
__TOC__
__TOC__
==Beschreibung==
==Description==


Der MakroExecutor dient dazu, um ohne einen CoPlanner Client geöffnet zu haben, [[Framework:Makros|Makros]] ausführen zu können. Der Aufruf erfolgt über die DOS – Eingabeaufforderung.
The MakroEcecutor allows executing [[Framework:Macros|CoPlanner macros]] without an open CoPlanner client. You start the macro in the command prompt.


==Einrichten der Verbindung==
==Establish the connection==


Wie bei allen Clients des CoPlanner existiert hierfür eine Konfigurationsdatei mit dem Namen ClientConfig.xml.
There exists a configuration file with the name "ClientConfig.xml". You find this file in the same folder as the MakroExecutor.
Dieses liegt im selben Verzeichnis wie der MakroExecutor.


  <font color="#0000ff"><?</font><font color="#a31545">xml </font><font color="#ff0000">version</font><font color="#0000ff">=</font><font color="#000000">"</font><font color="#0000ff">1.0</font><font color="#000000">"</font> <font color="#ff0000">encoding</font><font color="#0000ff">=</font><font color="#000000">"</font><font color="#0000ff">utf-16</font><font color="#000000">"</font> <font color="#ff0000">standalone</font><font color="#0000ff">=</font><font color="#000000">"</font><font color="#0000ff">yes</font><font color="#000000">"</font><font color="#0000ff">?></font>
  <font color="#0000ff"><?</font><font color="#a31545">xml </font><font color="#ff0000">version</font><font color="#0000ff">=</font><font color="#000000">"</font><font color="#0000ff">1.0</font><font color="#000000">"</font> <font color="#ff0000">encoding</font><font color="#0000ff">=</font><font color="#000000">"</font><font color="#0000ff">utf-16</font><font color="#000000">"</font> <font color="#ff0000">standalone</font><font color="#0000ff">=</font><font color="#000000">"</font><font color="#0000ff">yes</font><font color="#000000">"</font><font color="#0000ff">?></font>
Line 21: Line 20:
  <font color="#0000ff"></</font><font color="#a31545">ClientConfig</font><font color="#0000ff">></font>
  <font color="#0000ff"></</font><font color="#a31545">ClientConfig</font><font color="#0000ff">></font>


Tragen Sie bei Server den Namen oder die IP des Rechners ein, auf welchem der CoPlanner Server installiert ist ein. Port ist jenes TCP Port, das vom Server geöffnet wird um die Kommunikation mit den Clients zu ermöglichen (Standard: 8963). MaxRows ist die Anzahl der Datensätze, die maximal an den Client gesendet werden können (ist für den MakroExecutor jedoch nicht relevant).
At server insert the name or the IP of the Computer, on which CoPlanner Server was installed. Insert the port number of CoPlanner Server. MaxRows isn't necessary.


==Aufruf==
==Run==
 
In this example the CoPlanner server is installed at "C:\Programms\CoPlanner". You will find the MakroExecutor in the folder CoPlanner\Server\Tools. the name of the MakroExecutor is CopMakro.
The name of the macro, which we want to run is "MyCopMakro". So insert in the command prompt following command:


In unserem Beispiel nehmen wir an der der CoPlanner im Programm – Verzeichnis des Systemlaufwerks liegt. Dh. der Pfad dorthin lautet C:\Programme\CoPlanner. Bei CoPlanner Server Installationen finden Sie den MakroExecutor im Verzeichnis Tools.
Der Name des MakroExecutors lautet CopMakro. Als Kommandozeilenparameter wird ihm der Name des Makros, welches Sie ausführen möchten übergeben. Nehmen wir an, das Makro heißt „MyCopMakro“.
Der Aufruf lautet:
C:\Programme\CoPlanner\Tools\MakroExecutor\CopMakro.exe Makroname=MyCopMakro
C:\Programme\CoPlanner\Tools\MakroExecutor\CopMakro.exe Makroname=MyCopMakro


{| {{Bausteindesign1}}
{| {{Bausteindesign1}}
|-
|-
|<span style="color: darkblue">'''Hinweis'''</span> &nbsp;Der Aufruftext ist casesensitive. Das bedeutet, dass die Groß-/Kleinschreibung des Makronamens ausschlaggebend ist.  
|<span style="color: darkblue">'''Hint'''</span> &nbsp;The expression is casesensitive.  
|}
|}


Nach dem Bestätigen des Befehls wird eine Verbindung hin zum CoPlanner Server aufgebaut und das Makro wird ausgeführt.
There is the possibility to run the macro with an certain user, plan and company. You define these in the file "SessionSetting.xml".
Ist in dem Makro eine Importprozedur enthalten oder Aufgaben, die einen bestimmten Plan betreffen gibt es die Möglichkeit, Benutzer, Plan und Unternehmen dem MakroExecutor mitzuteilen und sich dadurch mit einem bestimmten Benutzer, an ein Unternehmen und an einen gewünschten Plan anzumelden.
Die ist durch die Datei SessionSetting.xml möglich.
 


  <font color="#0000ff"><?</font><font color="#a31545">xml </font><font color="#ff0000">version</font><font color="#0000ff">=</font><font color="#000000">"</font><font color="#0000ff">1.0</font><font color="#000000">"</font> <font color="#ff0000">encoding</font><font color="#0000ff">=</font><font color="#000000">"</font><font color="#0000ff">utf-16</font><font color="#000000">"</font> <font color="#ff0000">standalone</font><font color="#0000ff">=</font><font color="#000000">"</font><font color="#0000ff">yes</font><font color="#000000">"</font><font color="#0000ff">?></font>
  <font color="#0000ff"><?</font><font color="#a31545">xml </font><font color="#ff0000">version</font><font color="#0000ff">=</font><font color="#000000">"</font><font color="#0000ff">1.0</font><font color="#000000">"</font> <font color="#ff0000">standalone</font><font color="#0000ff">=</font><font color="#000000">"</font><font color="#0000ff">yes</font><font color="#000000">"</font><font color="#0000ff">?></font>
  <font color="#0000ff"><</font><font color="#a31545">SessionSetting</font><font color="#0000ff">></font>
  <font color="#0000ff"><</font><font color="#a31545">SessionSetting</font><font color="#0000ff">></font>
  <font color="#0000ff">  <</font><font color="#a31545">Version</font><font color="#0000ff">></font><font color="black">1</font><font color="#0000ff"></</font><font color="#a31545">Version</font><font color="#0000ff">></font>
  <font color="#0000ff">  <</font><font color="#a31545">Version</font><font color="#0000ff">></font><font color="black">1</font><font color="#0000ff"></</font><font color="#a31545">Version</font><font color="#0000ff">></font>
Line 49: Line 45:
  <font color="#0000ff"></</font><font color="#a31545">SessionSetting</font><font color="#0000ff">></font>
  <font color="#0000ff"></</font><font color="#a31545">SessionSetting</font><font color="#0000ff">></font>


Insert the necessary values at User, Password and Entity.


Tragen Sie bei User den gewünschten Benutzer und bei Password das zugehörige Passwort ein. Entity steht für Unternehmen und bei Plan tragen Sie den Plan ein, an den Sie sich anmelden möchten.


{| {{Bausteindesign1}}
{| {{Bausteindesign1}}
|-
|-
|<span style="color: darkblue">'''Hinweis'''</span> &nbsp;Keiner der obigen Einträge darf Sonderzeichen enthalten, also z.B. auch keine Umlaute!  
|<span style="color: darkblue">'''Hint'''</span> &nbsp;No special characters are allowed!  
|}
|}
==SSPI==
The macro executer is allowed to run as SSPI user  (beginning with version 9.3 HF 2.3)
In favour a seperate SSPI user must be created in the domain and in CoPlanner. This user is only in charge of the macro execution.  Each macro is running under these user.
{| {{Bausteindesign1}}
|-
|<span style="color: darkblue">'''Hint'''</span> &nbsp;The macros have to be protected
|}
For this propose you have to define a continuation condition previous to the first macro.
[[Image:Fw_SSPI_Macroexecutor.jpg|thumb|center|Framework, Definition of the continuation condition]]
The expression is the Copsys_ID of the "Macro-User".
For the SSPI LogOn you have to modify the file SessionSettings.xml. Username is empty and the password is "SSPI"
<font color="#0000ff"><?</font><font color="#a31545">xml </font><font color="#ff0000">version</font><font color="#0000ff">=</font><font color="#000000">"</font><font color="#0000ff">1.0</font><font color="#000000">"</font> <font color="#ff0000">standalone</font><font color="#0000ff">=</font><font color="#000000">"</font><font color="#0000ff">yes</font><font color="#000000">"</font><font color="#0000ff">?></font>
<font color="#0000ff"><</font><font color="#a31545">SessionSetting</font><font color="#0000ff">></font>
<font color="#0000ff">  <</font><font color="#a31545">Version</font><font color="#0000ff">></font><font color="black">1</font><font color="#0000ff"></</font><font color="#a31545">Version</font><font color="#0000ff">></font>
<font color="#0000ff">  <</font><font color="#a31545">User</font><font color="#0000ff">></font><font color="#0000ff"></</font><font color="#a31545">User</font><font color="#0000ff">></font>
<font color="#0000ff">  <</font><font color="#a31545">Password</font><font color="#0000ff">></font><font color="black">SSPI</font><font color="#0000ff"></</font><font color="#a31545">Password</font><font color="#0000ff">></font>
<font color="#0000ff">  <</font><font color="#a31545">Entity</font><font color="#0000ff">></font><font color="black">Bike GmbH</font><font color="#0000ff"></</font><font color="#a31545">Entity</font><font color="#0000ff">></font>
<font color="#0000ff">  <</font><font color="#a31545">Plan</font><font color="#0000ff">></font><font color="black">Budget 2013</font><font color="#0000ff"></</font><font color="#a31545">Plan</font><font color="#0000ff">></font>
<font color="#0000ff"></</font><font color="#a31545">SessionSetting</font><font color="#0000ff">></font>





Latest revision as of 15:12, 23 January 2023

Description

The MakroEcecutor allows executing CoPlanner macros without an open CoPlanner client. You start the macro in the command prompt.

Establish the connection

There exists a configuration file with the name "ClientConfig.xml". You find this file in the same folder as the MakroExecutor.

<?xml version="1.0" encoding="utf-16" standalone="yes"?>
<ClientConfig>
   <IpSettings>
      <Version>1</Version>
      <Server>localhost</Server>
      <Port>8963</Port>
      <MaxRows>100000</MaxRows>
      <MaxCells>0</MaxCells>
      <TcpFormatter>Bin</TcpFormatter>
   </IpSettings>
</ClientConfig>

At server insert the name or the IP of the Computer, on which CoPlanner Server was installed. Insert the port number of CoPlanner Server. MaxRows isn't necessary.

Run

In this example the CoPlanner server is installed at "C:\Programms\CoPlanner". You will find the MakroExecutor in the folder CoPlanner\Server\Tools. the name of the MakroExecutor is CopMakro. The name of the macro, which we want to run is "MyCopMakro". So insert in the command prompt following command:

C:\Programme\CoPlanner\Tools\MakroExecutor\CopMakro.exe Makroname=MyCopMakro

Hint  The expression is casesensitive.

There is the possibility to run the macro with an certain user, plan and company. You define these in the file "SessionSetting.xml".

<?xml version="1.0" standalone="yes"?>
<SessionSetting>
   <Version>1</Version>
   <User>Administrator</User>
   <Password>pwd</Password>
   <Entity>Bike GmbH</Entity>
   <Plan>Plan Bike GmbH</Plan>
</SessionSetting>

Insert the necessary values at User, Password and Entity.


Hint  No special characters are allowed!


SSPI

The macro executer is allowed to run as SSPI user (beginning with version 9.3 HF 2.3)

In favour a seperate SSPI user must be created in the domain and in CoPlanner. This user is only in charge of the macro execution. Each macro is running under these user.

Hint  The macros have to be protected

For this propose you have to define a continuation condition previous to the first macro.


Framework, Definition of the continuation condition

The expression is the Copsys_ID of the "Macro-User".

For the SSPI LogOn you have to modify the file SessionSettings.xml. Username is empty and the password is "SSPI"


<?xml version="1.0" standalone="yes"?>
<SessionSetting>
   <Version>1</Version>
   <User></User>
   <Password>SSPI</Password>
   <Entity>Bike GmbH</Entity>
   <Plan>Budget 2013</Plan>
</SessionSetting>