Flowable 6.6.0 Eclipse设计器 - 5.扩展Flowable设计器 - 5.1定制调色板(1)

Flowable 6.6.0 用户指南相关文档下载

有关Flowable文档的其他资料,参见:

《Flowable文档大全》


《Flowable 6.6.0 Eclipse设计器》

1 安装(Installation
2 Flowable 设计器编辑器特性(Flowable Designer editor features)
3 Flowable设计器BPMN 特性(Flowable Designer BPMN features)
4 Flowable设计器部署特性(Flowable Designer deployment features)
5 扩展Flowable设计器(Extending Flowable Designer)

5 扩展Flowable设计器(Extending Flowable Designer)

5.1 定制调色板(Customizing the palette)

5.1.1 扩展设置(Eclipse/Maven)Extension setup (Eclipse/Maven)

Download and extract Eclipse (most recent versions should work) and a recent version (3.x) of Apache Maven. If you use a 2.x version of Maven, you will run into problems when building your project, so make sure your version is up to date. We assume you are familiar with using basic features and the Java editor in Eclipse. It’s up to you whether you prefer to use Eclipse’s features for Maven or run Maven commands from a command prompt.
下载并提取Eclipse(最新版本应该可以)和Apache Maven的最新版本(3.x)。如果使用2.x版本的Maven,在构建项目时会遇到问题,因此请确保您的版本是最新的。我们假设您熟悉在Eclipse中使用基本特性和Java编辑器。您是喜欢将Eclipse的特性用于Maven还是从命令提示符下运行Maven命令,这取决于您的选择。

Create a new project in Eclipse. This can be a general project type. Create a pom.xml file at the root of the project to contain the Maven project setup. Also create folders for the src/main/java and src/main/resources folders, which are Maven conventions for your Java source files and resources respectively. Open the pom.xml file and add the following lines:
在Eclipse中创建一个新项目。这可以是常规项目类型。在项目根目录创建pom.xml文件,以包含Maven项目设置。还要为src/main/java和src/main/resources文件夹创建文件夹,他们分别用于java源文件和资源的Maven惯例。打开pom.xml文件并添加以下行:

<project
  xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <groupId>org.acme</groupId>
  <artifactId>money-tasks</artifactId>
  <version>1.0.0</version>
  <packaging>jar</packaging>
  <name>Acme Corporation Money Tasks</name>
...
</project>


As you can see, this is just a basic pom.xml file that defines a groupId, artifactId and version for the project. We will create a customization that includes a single custom node for our money business.
Add the integration library to your project’s dependencies by including this dependency in your pom.xml file:
如你所见,这只是一个基本的pom.xml文件,以定义项目的groupId、artifactId和版本。我们将为我们的货币业务(money business)创建一个包含单个自定义节点的定制。
通过将此依赖项包含在pom.xml文件,将集成库添加到您的项目依赖中:

<dependencies>
  <dependency>
    <groupId>org.flowable.designer</groupId>
    <artifactId>org.flowable.designer.integration</artifactId>
    <version>5.22.0</version> <!-- Use the current Flowable Designer version -->
    <scope>compile</scope>
  </dependency>
</dependencies>
...
<repositories>
  <repository>
      <id>Flowable</id>
   </repository>
</repositories>

Finally, in the pom.xml file, add the configuration for the maven-compiler-plugin so the Java source level is at least 1.5 (see snippet below). You will need this in order to use annotations. You can also include instructions for Maven to generate the JAR’s MANIFEST.MF file. This is not required, but you can use a specific property in the manifest to provide a name for your extension (this name may be shown at certain places in the designer and is primarily intended for future use if you have several extensions in the designer). If you wish to do so, include the following snippet in pom.xml:
最后,在pom.xml文件中,添加maven-compiler-plugin配置,使Java源级别(Java source level)至少为1.5(请参阅下面的代码片段)。您需要这个以使用注解。您还可以包含Maven生成JAR的MANIFEST.MF文件的指令。这不是必需的,但您可以使用manifest中的特定属性为您的扩展提供名称(如果您在设计器中有多个扩展,此名称可能会显示在设计器中的某些位置,主要用于将来使用)。如果您希望这样做,请在pom.xml文件包含下述代码片段:

<build>
  <plugins>
    <plugin>
      <artifactId>maven-compiler-plugin</artifactId>
      <configuration>
        <source>1.8</source>
        <target>1.8</target>
        <showDeprecation>true</showDeprecation>
        <showWarnings>true</showWarnings>
        <optimize>true</optimize>
      </configuration>
    </plugin>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-jar-plugin</artifactId>
      <version>2.3.2</version>
      <configuration>
        <archive>
          <index>true</index>
          <manifest>
            <addClasspath>false</addClasspath>
            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
          </manifest>
          <manifestEntries>
            <FlowableDesigner-Extension-Name>Acme Money</FlowableDesigner-Extension-Name>
          </manifestEntries>
        </archive>
      </configuration>
    </plugin>
  </plugins>
</build>

The name for the extension is described by the FlowableDesigner-Extension-Name property. The only thing left to do now is tell Eclipse to setup the project according to the instructions in pom.xml. So open up a command shell and go to the root folder of your project in the Eclipse workspace.
扩展的名称由FlowableDesigner-Extension-Name property描述。现在只剩下告诉Eclipse根据pom.xml文件中的说明设置项目。因此,打开一个命令shell并转到Eclipse工作空间(Eclipse workspace)中项目的根文件夹。
Then, execute the following Maven command:
mvn eclipse:eclipse
Wait until the build is successful. Refresh the project (use the project’s context menu (right-click) and select Refresh). You should now have the src/main/java and src/main/resources folders as source folders in the Eclipse project.
然后,执行以下Maven命令:
mvn eclipse:eclipse
等待生成成功。刷新项目(使用项目的上下文菜单(右键单击)并选择“Refresh” ( “刷新”))。现在,您应该将src/main/java和src/main/resources文件夹作为Eclipse项目中的源文件夹。
Note
You can, of course, also use the m2eclipse plugin and simply enable Maven dependency management from the context menu (right-click) of the project. Then choose Maven > Update project configuration from the project’s context menu. That should setup the source folders as well.
注意
当然,您也可以使用m2eclipse 插件,从项目的上下文菜单(右键单击)启用Maven依赖项管理。然后从项目的上下文菜单中选择Maven > Update 项目配置。这也能设置源文件夹。
That’s it for the setup. Now you’re ready to start creating customizations to Flowable Designer!
这是关于设置的。现在,您可以开始为Flowable Designer(Flowable设计器)创建自定义项了!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

月满闲庭

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值