Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space PRINSAG and version 9.0
Sv translation
languageen

You can assign parameters that are not available in Rule Parameters Editor by editing the code.


 
The code for assigning a parameter to an action looks like this:

Public Sub ConfigureAction( _
ByVal triggerEvent As
Creo.PWS.Automation.PrinergyDataModel.InputFileCreatedEvent, _
ByVal action As Creo.PWS.Automation.PrinergyDataModel.RefineAction)
' --- Assign the value of the action parameter "InputFiles" ---
action.InputFiles = triggerEvent.InputFiles
' --- Assign the value of the action parameter "ProcessTemplatePath"
---
action.ProcessTemplatePath = "Storage:Archive:Archive:ArchiveAll"
' --- Assign the value of the action parameter "Comment" ---
' action.Comment = some value expression
End Sub

If a parameter is not assigned a value in the user interface, it appears in the code as a comment. You must un-comment it to give it a value.


Assigning static values

A static value is a value that is the same every time that a rule is fired, such as the process template to use, the e-mail address to send to, the priority to use, and so on.

'--- Assign the value of the Action Parameter "Comment" ----
action.Comment = "This is a test comment"
'--- Assign the value of the Action Parameter "Priority" ----
action.Priority = 2


Assigning event properties

Event properties are dynamic values—they change every time a rule fires. Assign a property of the event to a parameter of the action:

'--- Assign the value of the Action Parameter "Job" ---
action.Job = triggerEvent.Job
'--- Assign the value of the Action Parameter "UserName" ---
action.UserName = triggerEvent.Process.UserName


Assigning strings with embedded properties

You may want to construct a string that combines static values with event property values. This is particularly useful for e-mail messages.

'--- Assign the value of the Action Parameter "Subject" ---
action.Subject = ("Failed refine in Job " + triggerEvent.Process.Job.Name
+ ".")

 

Sv translation
languagede

Sie können im Regelparameter-Editor nicht verfügbare Parameter zuweisen, indem Sie den Code bearbeiten.

Anchor
Bookmark169_concept_DBB70F30D98349FABF2A
Bookmark169_concept_DBB70F30D98349FABF2A

Der Code zum Zuweisen eines Parameters zu einer Aktion sieht folgendermaßen aus:
Public Sub ConfigureAction( _
ByVal triggerEvent As Creo.PWS.Automation.PrinergyDataModel.InputFileCreatedEvent, _
ByVal action As Creo.PWS.Automation.PrinergyDataModel.RefineAction)
' — Assign the value of the action parameter "InputFiles" —
action.InputFiles = triggerEvent.InputFiles
' — Assign the value of the action parameter "ProcessTemplatePath" —
action.ProcessTemplatePath = "Storage:Archive:Archive:ArchiveAll"
' — Assign the value of the action parameter "Comment" —
' action.Comment = some value expression
End Sub
Wenn einem Parameter kein Wert in der Benutzeroberfläche zugewiesen ist, wird er im Code als Kommentar angezeigt. Sie müssen ihn auskommentieren, um ihm einen Wert zuweisen zu können.
Zuweisen statischer Werte
Ein statischer Wert ist bei jedem Auslösen einer Regel gleich, z. B. die zu verwendende Prozessvorlage, die Ziel-E-Mail-Adresse, die zu verwendende Priorität usw.
'--- Assign the value of the Action Parameter "Comment" ----
action.Comment = "This is a test comment"
'--- Assign the value of the Action Parameter "Priority" ----
action.Priority = 2
Zuweisen von Ereigniseigenschaften
Die Ereigniseigenschaften sind dynamische Werte, d. h., sie ändern sich bei jedem Auslösen der Regel. Weisen Sie einem Parameter der Aktion eine Eigenschaft des Ereignisses zu:
'--- Assign the value of the Action Parameter "Job" —
action.Job = triggerEvent.Job
'--- Assign the value of the Action Parameter "UserName" —
action.UserName = triggerEvent.Process.UserName
Zuweisen von Zeichenfolgen mit eingebetteten Eigenschaften
Sie können eine Zeichenfolge erstellen, in der statische Werte mit Werten von Ereigniseigenschaften kombiniert sind. Bei E-Mails ist dies besonders sinnvoll.
'--- Assign the value of the Action Parameter "Subject" —
action.Subject = ("Failed refine in Job " + triggerEvent.Process.Job.Name + ".")

Sv translation
languagezh

可以通过编辑代码,指定规则参数编辑器中未提供的参数。

Anchor
Bookmark169_concept_DBB70F30D98349FABF2A
Bookmark169_concept_DBB70F30D98349FABF2A

为操作指定参数的代码类似以下:
Public Sub ConfigureAction( _
ByVal triggerEvent As Creo.PWS.Automation.PrinergyDataModel.InputFileCreatedEvent, _
ByVal action As Creo.PWS.Automation.PrinergyDataModel.RefineAction)
' — Assign the value of the action parameter "InputFiles" —
action.InputFiles = triggerEvent.InputFiles
' — Assign the value of the action parameter "ProcessTemplatePath" —
action.ProcessTemplatePath = "Storage:Archive:Archive:ArchiveAll"
' — Assign the value of the action parameter "Comment" —
' action.Comment = some value expression
End Sub
如果在用户界面中未指定某个参数的值,该参数在代码中将显示为注释。您必须取消它的注释符号,并为其赋值。
指定静态值
静态值是每次触发规则时都相同的值,例如要使用的处理模板、收件电子邮件地址、要使用的优先级等。
'--- Assign the value of the Action Parameter "Comment" ----
action.Comment = "This is a test comment"
'--- Assign the value of the Action Parameter "Priority" ----
action.Priority = 2
指定事件属性
事件属性是动态值 - 每次触发规则时它们会改变。将事件的属性指定给操作的参数:
'--- Assign the value of the Action Parameter "Job" —
action.Job = triggerEvent.Job
'--- Assign the value of the Action Parameter "UserName" —
action.UserName = triggerEvent.Process.UserName
指定带有嵌入属性的字符串
您可能会希望构造静态值与事件属性值组合的字符串。这对于电子邮件消息特别有用。
'--- Assign the value of the Action Parameter "Subject" —
action.Subject = ("Failed refine in Job " + triggerEvent.Process.Job.Name + ".")

Sv translation
languagees

Es posible asignar parámetros que no están disponibles en el Editor de parámetros de reglas editando el código.

Anchor
Bookmark169_concept_DBB70F30D98349FABF2A
Bookmark169_concept_DBB70F30D98349FABF2A

El código para asignar un parámetro a una acción tiene este aspecto:
Public Sub ConfigureAction( _
ByVal triggerEvent As Creo.PWS.Automation.PrinergyDataModel.InputFileCreatedEvent, _
ByVal action As Creo.PWS.Automation.PrinergyDataModel.RefineAction)
' — Assign the value of the action parameter "InputFiles" —
action.InputFiles = triggerEvent.InputFiles
' — Assign the value of the action parameter "ProcessTemplatePath" —
action.ProcessTemplatePath = "Storage:Archive:Archive:ArchiveAll"
' — Assign the value of the action parameter "Comment" —
' action.Comment = some value expression
End Sub
Si un parámetro no tiene asignado un valor en la interfaz de usuario, aparecerá en el código como un comentario. Deberá anular el comentario para proporcionarle un valor.
Asignación de valores estáticos
Un valor estático es uno que es el mismo cada vez que se activa una regla como, por ejemplo, la plantilla de proceso que se debe usar, la dirección de correo electrónico que se debe emplear para los envíos, la prioridad que se debe aplicar, etc.
'--- Assign the value of the Action Parameter "Comment" ----
action.Comment = "This is a test comment"
'--- Assign the value of the Action Parameter "Priority" ----
action.Priority = 2
Asignación de propiedades de eventos
Las propiedades de eventos son valores dinámicos; es decir, cambian cada vez que se activa una regla. Asigna una propiedad del evento a un parámetro de la acción:
'--- Assign the value of the Action Parameter "Job" —
action.Job = triggerEvent.Job
'--- Assign the value of the Action Parameter "UserName" —
action.UserName = triggerEvent.Process.UserName
Asignación de cadenas con propiedades incrustadas
Puede construir una cadena que combine valores estáticos con valores de propiedades de eventos. Esto es especialmente útil para mensajes de correo electrónico.
'--- Assign the value of the Action Parameter "Subject" —
action.Subject = ("Failed refine in Job " + triggerEvent.Process.Job.Name + ".")

Sv translation
languagefr

Vous pouvez attribuer des paramètres qui ne sont pas disponibles dans l'Éditeur de paramètres de règles en éditant le code.

Anchor
Bookmark169_concept_DBB70F30D98349FABF2A
Bookmark169_concept_DBB70F30D98349FABF2A

Le code d'attribution d'un paramètre à une action se présente ainsi :
Public Sub ConfigureAction( _
ByVal triggerEvent As Creo.PWS.Automation.PrinergyDataModel.InputFileCreatedEvent, _
ByVal action As Creo.PWS.Automation.PrinergyDataModel.RefineAction)
' — Assign the value of the action parameter "InputFiles" —
action.InputFiles = triggerEvent.InputFiles
' — Assign the value of the action parameter "ProcessTemplatePath" —
action.ProcessTemplatePath = "Storage:Archive:Archive:ArchiveAll"
' — Assign the value of the action parameter "Comment" —
' action.Comment = some value expression
End Sub
Si un paramètre n'est pas attribué à une valeur dans l'interface utilisateur, il apparaît dans le code comme un commentaire. Vous ne devez pas le commenter pour lui donner une valeur.
Attribution de valeurs statiques
Une valeur statique est une valeur identique à chaque fois qu'une règle est lancée, comme le modèle de processus à utiliser, l'adresse électronique à laquelle envoyer des messages, la priorité à utiliser, etc.
'--- Assign the value of the Action Parameter "Comment" ----
action.Comment = "This is a test comment"
'--- Assign the value of the Action Parameter "Priority" ----
action.Priority = 2
Attribution des propriétés d'événement
Les propriétés d'événement sont des valeurs dynamiques ; elles changent chaque fois qu'une règle est lancée. Attribuez une propriété de l'événement à un paramètre de l'action :
'--- Assign the value of the Action Parameter "Job" —
action.Job = triggerEvent.Job
'--- Assign the value of the Action Parameter "UserName" —
action.UserName = triggerEvent.Process.UserName
Attribution de chaînes avec des propriétés intégrées
Il peut être souhaitable de construire une chaîne combinant valeurs statiques et valeurs de propriétés d'événement. C'est particulièrement utile pour les messages électroniques.
'--- Assign the value of the Action Parameter "Subject" —
action.Subject = ("Failed refine in Job " + triggerEvent.Process.Job.Name + ".")

Sv translation
languageja

コードを編集することにより、ルール パラメータ エディタで選択できないパラメータを割り当てることができます。

Anchor
Bookmark169_concept_DBB70F30D98349FABF2A
Bookmark169_concept_DBB70F30D98349FABF2A

アクションにパラメータを割り当てるためのコードは、以下のようになります。
Public Sub ConfigureAction( _
ByVal triggerEvent As Creo.PWS.Automation.PrinergyDataModel.InputFileCreatedEvent, _
ByVal action As Creo.PWS.Automation.PrinergyDataModel.RefineAction)
' — Assign the value of the action parameter "InputFiles" —
action.InputFiles = triggerEvent.InputFiles
' — Assign the value of the action parameter "ProcessTemplatePath" —
action.ProcessTemplatePath = "Storage:Archive:Archive:ArchiveAll"
' — Assign the value of the action parameter "Comment" —
' action.Comment = some value expression
End Sub
ユーザー インターフェイスでパラメータに値を割り当てない場合、パラメータはコード内にコメントとして表示されます。このパラメータに値を設定するには、非コメント化する必要があります。
静的な値の割り当て
静的な値とは、ルールが起動しても例外なく変化しない値のことです。たとえば、使用するプロセス テンプレート、送信先の E-メール アドレス、使用する優先順位などがあります。
'--- Assign the value of the Action Parameter "Comment" ----
action.Comment = "This is a test comment"
'--- Assign the value of the Action Parameter "Priority" ----
action.Priority = 2
イベント プロパティの割り当て
イベント プロパティとは、動的な値、つまりルールが起動するたびに変化する値のことです。イベント プロパティをアクションのパラメータに割り当てるには、以下のコードを記述します。
'--- Assign the value of the Action Parameter "Job" —
action.Job = triggerEvent.Job
'--- Assign the value of the Action Parameter "UserName" —
action.UserName = triggerEvent.Process.UserName
プロパティが埋め込まれた文字列の割り当て
静的な値とイベント プロパティ値を組み合わせて文字列を構成する必要がある場合があります。これは、特に E-メール メッセージで役立ちます。
'--- Assign the value of the Action Parameter "Subject" —
action.Subject = ("Failed refine in Job " + triggerEvent.Process.Job.Name + ".")