How to setup Python/Jython in IBM BPM - jython

I want to configure Python/Jython in IBM BPM, so that these files can directly executed from process app. How can I do that?
How to setup this entry in WebSphere Application Server?

Why do you need to install python or jython on IBM BPM , if you need it to make deploy using WAS command line , there're commands that not related to jython or python and can do the same.

I don't believe that IBM BPM Standard really handles this use case (although more details would help). It is possible it maybe part of the "Advanced" offering, but I'm not as familiar with the integration designer product.
IBM BPM Standard allows you to call java code directly either as LiveConnect (bad) or executing java code you place in JAR files in the server files of your Process App (good). I have seen this used to leverage the Java ability to call command line scripts in order to issue some of the WASAdmin scripts, but that has been the limit of the integration with jython that I have seen.
For details about creating Java connectors you can use this article - http://www.ibm.com/developerworks/bpm/bpmjournal/1206_olivieri/1206_olivieri.html. While it says 7.5.1 the approach works for TeamWorks 7 through IBM BPM 8.5.5
Can you give more details about the use case you are trying to meet with this technical approach?

You can call any system process api/command using java, java code can be called by using as jar libraries.
System process api/command can execute python or any other code.
IBM BPM > Jar libs > System (OS) Process API/Commands > Python
I haven't come across any such use case.

Related

What's the tools for testing of Azure configuration created from ARM template?

Of course, each resource should be tested in individual way. But maybe some tools exist which provide some framework and help to automate and to connect typical steps?
I mean:
Template validation - for example with ARM template test toolkit
Logs analysis after deployment (for errors, for example)
Testing typical Azure resources by their types
etc
We can check for template validation if we develop our ARM template in VSCode, as it will show us the architecture of our template design.
To check for errors, when you select Powershell as interpreter and execute your ARM template from .ps script. It will give us all the error and status about the execution.
So according to this, we can test by implementing in Azure portal and need to check the deployed infrastructure and executed output. Ideally, we can achieve these from VS Code.

Vapi-xp library properties of TDAPIOLELIB are disabled

We are writing the vb scripts in Vapi-xp (in QC) to execute the Shell scripts in unix box.
At present, Vapi calls the functional library in the local to run shell scripts.
As part of enhancements to Frame Work , we trying to attach the Functional library in ALM(QC) and to download the same to local at run-time.
To Download the attachment from ALM to local: We tried to use TDAPIOLELIB reference library in Vapi-xp But most of the Properties like Treemanager are Disabled.
So anyone knows the fix to above problem.please let us know
Is there any better approach to download the attachments from vapi-xp?
I don't know how to download from inside vapi-xp, but you can have the ALM deployment engine deploy your files from ALM server the same way as it deploys the rest of the ALM client.
For detailed instructions on how to make it work look for the custom test types guide in ALM documentation.
There in the deployment section you have instructions on packaging your files and placing them on ALM server for download.
We have used the OTA client library to download the VAPI-XP scripts.
The IExtendedStorage interface is used in getting the downloads.
Using the Rest API, the following URL downloads the scripts in VAPI-XP:
/rest/domains/DEFAULT/projects/<project_name>/tests/<test_id>/storage?login-form-required=y
e.g.
/rest/domains/DEFAULT/projects/sample/tests/6/storage?login-form-required=y

Installing print driver on Windows Azure VM

We have a native, stand alone Win32 application that we use to generate .PDF files. It is command line driven to take one of our data files in and generate a PDF file. It works in conjunction with a print driver that is installed on the computer.
I know there are libraries for generating PDF files in .NET that we can use in Azure, however, there is specific type layout being carried out in our App that we must support, and that logic is not yet on the server side. This is a short term cheat, before we port (or rewrite) our 20 year old type layout engine out of C/C++. There is alot of code here with alot of complexity.
I see that we can now run native apps in Azure (yay). However, my issue seems to be that this native application requires a print driver installed. I have not been able to find any information about installing print driver in Azure worker role.
I found this discussion: https://stackoverflow.com/questions/9125385/printing-to-pdf-from-azure-worker-role. The end result of this is to use a PDF library on Azure, which is not something that will work for us.
Also, I am aware that it is not the best use of a server to fire up a process to generate a PDF file everytime somebody wants to preview their data file in our web site. We are planning on cheating by showing the user the PDF, when they want to preview our proprietary data format in a browser. This is Phase I of a project, and rewriting our 20 year old type layout engine in C# is going to take alot longer to accomplish, and we are talking about this (admitted hack) as a short term (in the bigger sense of things) measure.
How do I install a Print Driver in Windows Azure worker role? Is it possible? Are there any other options?
Many Thanks.
If you can do a command line, silent install of the Amyuni software that yms mentioned then you could run that as part of a startup task on your worker role, probably with elevated permissions. People use startup tasks to do all sorts of things and many of them have written blog posts about it or answer questions about them here on SO, but a good place to start would be the official documentation.
This may help: Amyuni PDF Converter is a PDF printer driver with an API exposed as a COM interface and as a net. assembly that allows you to silently install and uninstall the driver programmatically. This can be done by using the methods PDFDriverInit and DriverEnd from your application.
Once your application installs the driver, you can print to PDF using a memory stream as destination and upload it to a Microsoft Azure Blob Storage.
There are 2 ways of installing Amyuni PDF Converter:
1- Using the installation program provided with the package.
2- Copying the dll files to their corresponding folders and then calling the method DriverInit.
The complete process is explained here:
Using the Developer Version of the Amyuni Document Converter
About your specific scenario, if you have an application that uses Amyuni PDF Converter, then there is indeed a printer driver that should be installed with it. Your application could be installing the driver every time it is launched and removing it when it is closed, or it could be installing it only during the installation of your program.
If you do not have the source code of this application but you still have the license information of the library provided by Amyuni, you could try building a small application or batch script that just takes care of the installation process. You can contact Amyuni support for a link to the latest build of the version you are using.
You mentioned that you are using Windows Azure VM, so I am assuming that you have administrative rights on the virtual system and that you can connect to it using remote desktop and run any kind of applications.
Usual disclaimer applies

Continous- integration software for cmake project hosted on github

We are looking for a software to run our test cases automatically.
We want a software which will run on our server (or a commercial), which automatically gets the newest commit on github. Then compiles the commit of the project with CMake and run Ctest on our test cases. The results should then be visualized on a nice website.
I had a look at CDash, but as the documentation is so bad I did not even get it to get the latest commit from github.
So my questions are:
Is there a good tutorial to CDash? Except the bad wiki page.
What software is available for running tests on new commits to github, what are their advantages and drawbacks?
In answer to your second question, Jenkins is a robost and extensible continuous integration tool that can be integrated tightly with GitHub using a plug-in (or loosely using standard Git support). It also supports CMake via a plug-in. Whether it has disadvantages that will make it less useful for you depends on your organization and build process, but I've found it to be highly customizable to a wide variety of processes. I recommend taking a look at it.
There's also a third-party Ctest plugin available for Jenkins.
CDash works in pair with CTest. If you are already using CMake then it should be fairly easy to submit your testing results to CDash. I'd recommend reading the CTest documentation:
http://www.vtk.org/Wiki/CMake_Testing_With_CTest
You can either install your own CDash server or use Kitware's hosted server at my.cdash.org. You can test your server with a sample project available at:
http://www.cdash.org/cdash/resources/software.html

Cross platform build environment

As good developers we keep our code as standard compliant as possible to help in porting between platforms. But what tools are available that help us build the code in a uniform way across multiple platforms.
*nix family has make but Windows needs nmake.
I have read about SCons but never used it in anger. What is your favorite build tool, why do you find it effective and are there any limitations (i.e. platforms with bad support etc).
Cross platform IDEs as well.
cmake for c/c++ environments is good. http://www.cmake.org/
I personally use ant, rake, and maven2. I have used ant the most and find it great for several reasons:
Because it is java it works on lots of platforms (without changing any scripts)
The build files are written in XML and fairly easy to write
There are lots of 3rd party extensions available for it and it is easy to write plugins for
we do extreme cross development, and our code runs on linux, windows ce, windows 2K, nucleus and uCOS-II.
since each environment uses different 'make' methodology (out nucleus customer, for example, require us to compile via code-warrior GUI).
i used ANT combined with perl for about 2 years, but this lead the build script to total non-maintainability.
now we moved to use python, which increase the maintainability of the scripts.
bottom line, i did not find a ready-made tool, and had to build my own. maybe, when i have some time (2017 ?) i will pack my scripts and distribute them ....
If you're in the Java world, there are quite a few tools which are cross-platform. Apache Ant and Maven are both build tools which will run on any platform which has Java available for it.
Cruise Control (continuous integration tool) also works on Windows and Linux (it's written in Java as well).
I haven't had any real issues with the core tools, the only problems I've sometimes had have come from things external to the build process, i.e. publishing artifacts - this will vary between systems so I've found there's no single way of setting it up.
For C/C++ development, I've found that bakefile works well. The fairly large wxWidgets project, a cross-platform cross-platform utility and UI library, uses it for their build file generation.
Bakefile is cross-platform, cross-compiler native makefiles generator. It takes compiler-independent description of build tasks as input and generates native makefile (autoconf's Makefile.in, Visual C++ project, bcc makefile etc.).
Bakefile's task is to generate native makefiles, so that people can keep using their favorite tools. There are other cross-platform make solutions, but they either aren't native and require the user to use unfamiliar tools (Boost.Build) or they are too limited (qmake).
You can use gmake on Windows as well with cygwin/minGW or build your windows stuff on Linux.
http://cdtdoug.blogspot.com/2009/05/mingw-cross-for-linux.html
There are tools like Opus Make or MKS Toolkit that offers multiplatform and support. If you have an existing codebase of make script, could be easier migrate to one of there. I suspect you may hunt for similar tools in advertising of DDJ magazine.
We've been running a Java environment for Linux, Windows and the Mac for the last 18 months.
Maven 2 drives our builds, it's pretty easy to get things consistent here. Where M2 plugins don't dare to tread, we use small Ant scripts.
IDE-wise we're using Eclipse & IDEA - both, of course, multi-platform.
Testing - JUnit, Fitnesse, Fest - all nicely multi-platform.
Release scripts are written in Ruby. There's a bit more trouble with Windows here, but a function to convert paths as necessary generally does the trick.
TeamCity does CI. We've actually migrated this from Windows to Linux and encountered no errors at all, very nice package.
We did use GWT for a while and this did cause us large amounts of pain. Be careful if you swing that way.