Document a command
This howto demonstrates how you can document your commands using a selection of HTML tags.
buildAndRunGuideHelloWorld
HelloWorld.java package org.example; import de.asap.pak.jlcint.commandapi.CommandGroup; import de.asap.pak.jlcint.commandapi.FieldScope; import de.asap.pak.jlcint.commandapi.JavaCommand; import de.asap.pak.jlcint.commandapi.Persistent; import de.asap.pak.jlcint.commandapi.Run; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Sample implementation for a example command that input name and returns a simple output. * * The @JavaCommand annotation is necessary for the annotation processor to recognize this class as a command. * If this is […]
buildAndRunGuideBuildGradle
build.gradle plugins { id ‚java-library‘ id ‚maven-publish‘ } ext { version = ‚1.0.0‘ pakVersion = ‚1.5.14‘ } allprojects { project.description = ‚Example Commands for PAK‘ project.group = ‚org.example‘ project.version = rootProject.ext.version repositories { mavenCentral() maven { name = ‚pak-explorer-maven‘ url ‚https://pak.asap.de/nexus/repository/pak-explorer-maven/‘ } } } subprojects { apply plugin: ‚java-library‘ apply plugin: ‚maven-publish‘ compileJava.options.encoding = ‚UTF-8‘ […]
How to Build and Run a Command
How to Build and Run your first Command Table of Contents 1. What You Will Learn 2. Prerequisites 3. What is a Command? 4. Implementation 4.1. Publishing the Command Jar-File 5. Build a Bpmn Workflow 5.1. Setting Up the Commands 5.2. Build the Workflow 6. Next Steps 1. What You Will Learn After finishing this […]
CreatingMetaJars
Creating MetaJars In order to open the command in the PAK editor, a JAR file must be created. This can be done in three different ways: You can create the JAR by executing the gradle MetaJar command in the terminal. Figure 1. gradle metaJar (Terminal) Or you can navigate to the build.gradle file and execute […]
Creating Commands from Legacy Code
This HowTo shows how legacy code can be turned into Commands
SampleCommandMeta
CommandMeta corresponding to previously defined command { „deprecated“: false, „group“: „myCommandGroup“, „id“: „stimuli.pkg5.CommandClass#myCommandByStringAndString“, „increment“: 0, „interpreter“: „de.asap.pak.jlcint.pakbridge.JavaServiceInterpreter“, „liteServices“: [ { „id“: „de.asap.pak.core.services.api.ICommandRestServices“, „key“: „restService“, „name“: „ICommandRestService“ } ], „major“: 2, „mappings“: [ { „documentation“: „Actual docu of my variable“, „isAllowedValuesSuggestion“: false, „key“: „myReadVariable“, „mandatory“: false, „scope“: „READ“, „type“: „STRING“ }, { „documentation“: „This is the […]
JavaCommandOverloading
Overloading of command @JavaCommandService public class CommandClass { […] public String myCommand(int myIntReadVariable, String myStringReadVariable) { (1) return „hello“; } public int myCommand(String myReadVariable) { (2) return 42; } } Last updated 2024-12-19 10:07:56 +0100
JavaCommandOneMethod
Processing of only one command within one class @JavaCommandService (1) public class CommandClass { @LiteService (2) private ICommandRestService restService; public CommandClass(final ICommandRestService restService) { this.restService = restService; } /** * This is the workflowDocumentation for my command * * @param myReadVariable Actual docu of my variable (3) * @param noReadVariable This is the documentation for […]
JavaCommandAllMethods
Processing of multiple commands within one class @JavaCommandService (1) public class CommandClass { @Service (2) private ICredentialRequester credentialRequester; public CommandClass(final ICredentialRequester credentialRequester) { this.credentialRequester = credentialRequester; } public void myCommand1(String str1, String str2) { (3) int strLength = str1.length() + str2.length(); } @Deprecated (4) public int myCommand2(String myReadVariable) { (5) return 42; } } Last […]