Lazy Man Joe's Ramblings

Sending a (PDF) Report when an Escalation fires on K2 (using SmartObjects and SSRS)

What I’ve done:

  1. Created a small process with an escalation on one of the activities to fire after 1 minute
  2. In the escalation I send an email, but I attach a report in PDF format from a SmartObject (pointing to a SSRS report)
  3. The report gets executed on the escalation and is then attached in the escalation email

How to:

  1. Create the report you want using the K2 Workspace Report Designer
    1. image001
  2. Build your report in the report builder (or if you have an SSRS report, you can import it for use) – I created a new report
    1. Image002
    2. My data source was info I already had available in SQL
  3. Once you’ve built your report, Publish it
    1. image003
  4.  I created a SQL Reporting Services Service in my environment (if it doesn’t exists already)
    1. image004
    2. image005
    3. image006
    4. Your environment may have a different SQL server version (I just used what I had on my VM)
    5. image007
  5. Now you need to create a SmartObject to reference the report you’ve built
    1. image008
    2. Give it a name, category and make sure it’s “advanced”
    3. image009
    4.  Your report should be visible under the SQL Reporting Service list in the designer
    5. image010
    6. Drag & Drop this onto the SmartObject Designer canvas (right hand side)
    7. Select “Create All” for the property mappings (report file) to bind everything
    8. image011
    9. You should now have a SmartObject with 1 Property (Report File) and a couple of methods
    10. image012
  6. I built a small workflow that does nothing, just to test
    1. image013
    2. Add your Escalation (advanced mode)
    3. image014
    4. Basic escalation settings (when, etc.) and then I fire an email
    5. image015
    6.  Standard stuff for email send
    7. image016
    8. image017
    9. Now add the attachment – THE IMPORTANT bit! 🙂
    10. Using an inline function to get the attachment and adding it to the email
      1. Drag & drop the Files – Get File from Content (…) function on the attachment field
      2. image018
      3. Drag & Drop your SMO “Export to PDF” item on the “Content” section
      4. Give the attachment that will be generated a name – I used “MyEscalationReport.pdf”
      5. image019
      6. No input mapping required for my demo report
      7. image020
      8. Select “Report File.Content” as the return property for the wizard
      9. image021
      10. You should end up with an attachment which states “Get File From Content (…..)
      11. image022
      12. Finish all the events and wizards.
  7. Deploy your workflow with the updated escalation info
  8. Test!
    1. image023
    2. image024

This is one way of utilising K2 SmartObjects and SSRS together.

Have fun !


How to install and run Raspbian Jessie from a USB stick on Raspberry Pi

UPDATE (May 2017):
This article focus on using a Raspberry Pi 2 & USB. 
If you however have a Raspberry Pi 3 and the latest version of Rasbian (Jessie April 2017 or later) then you can natively run from USB – See the documentation here on (

I have been playing around with my Raspberry Pi 2 lately and read that if you want to run some write-intensive code on the Pi (MySQL, etc.) and you have an SD card, you’re probably heading for trouble. SD cards have improved over the years, but they still suffer from having a limited write-cycle (eventually they stop working).

USB stick/drives on the other hand are quite cheap and have a much better write-cycle.

So my next “project” was trying to figure out how to run Raspbian Jessie from a USB stick.

Currently there is no way to boot directly from a USB stick on the Raspberry Pi, but this is solved by using a small SD card to bootstrap the process and point the boot-up manager to boot from the USB stick.

The following article gave me most of the information I needed, but I adapted it to my own set-up which I am documenting in this post – Install & Run Raspbian from a USB Flash Drive

My set-up:

Step 1 – Download Raspbian

Download Raspbian from the RaspberryPi website –

I downloaded the Raspbian Jessie Lite version as I’m planning on running a non-GUI, head-less installation.  This process will work for the full version as well.

Unzip the downloaded file to get the .img file ready to use.

Step 2 – Install Raspbian on your USB stick

I use ApplePi-Baker to make this process quick and easy.

Open ApplePi-Baker, supply your admin password (required as ApplePi-Baker needs root access behind the scenes to write the .img file, etc.)

First off, I “prep” the USB stick by formatting it

  • Select the drive (under the Pi-crust option)
  • Click on “Prep for Noobs” (basically ensuring the partitioning and formatting is done)
  • Wait for the prep to finish

Now you want to write the image file to the USB stick

  • Select the .img file (under the Pi-ingredients section)
  • Click on the “Restore Backup” option – this will write the .img file to the USB stick and may take a while to complete (5-10 mins depending on speed of USB stick)


Your USB stick is now prepped BUT you still need to configure the MicroSD card to ensure the Raspberry Pi boots from the correct drive.

Step 3 – Configure the MicroSD card

Use ApplePi-Baker to prep the SD card as well

  • Select the card in the Pi-Crust section
  • Click on “Prep for NOOBS” to partition and format it

Once formatted, you should see this drive mounted on your desktop as “RASPBERRY”

Copy all the files from the USB stick to the SD Card.

Step 4 – Change the boot path on your MicroSD card

Once you’ve completed step 3, you now need to tell the Raspberry Pi to boot from the USB stick. You do this by changing the boot path setting in the cmdline.txt file in the root of the MicroSD card.

Open the file using TextEdit and change the following:

  • root=/dev/mmcblk0p2


  • root=/dev/sda2

Save the changes and eject the USB stick and MicroSD card.

Step 5 – Boot up your Raspberry Pi

Plug your MicroSD card in the slot in the Raspberry Pi and the USB stick in one of the USB ports.

Add power and wait for the Raspberry Pi to boot up 🙂

Step 6 – Housekeeping (utilising all the space on the USB stick)

To utilise all the space on the USB stick, we need to expand the partition. Normally you would make use of the raspi-config utility to expand the file system, but this does not work on USB sticks.

Log in to the Raspberry Pi (standard username: pi, password: raspberry  [change this in future :-)])

Start FDISK with the following command:

sudo fdisk /dev/sda

Press p to see all the partitions. You should have only 2.

We need to delete the 2nd partition and recreate it – BUT we need to note the start position for the sda2 partition. (write down the start position number – for me it was 131072)

Press d and then 2, then ENTER. [this will delete the partition]

Now we need to create the partition again.

Press n, then p, then 2 and then ENTER.

Provide the start position (first sector) for partition 2. (for me it was 131072)

For the end position, just hit ENTER to use the full partition.

Press w to commit the changes. You will see a message about the table being in use, etc. but don’t worry about it.

Reboot the system to start using the updated partition info.

sudo reboot

Once rebooted, we need to resize the partition to use the full amount of space.

sudo resize2fs /dev/sda2

Once it’s done, reboot your Raspberry Pi again.

Confirm that the changes have taken effect by checking the space allocated using:

df -h

That’s it !

You are now running Raspbian Jessie from a USB stick (using the SD card to inform the Raspberry Pi to boot from the USB stick :-))

Have fun !

Installing Plex Server on a Raspberry Pi

I’m in the process of setting up a little media server to use in my car (for when we go on holiday) and I found a great resource for setting up Plex on a Raspberry Pi.

Have a look at the HTPCGuides guide on setting up a Plex Server on a Raspberry Pi.

They have a great installer which works on the Minibian image (which they supply) or you can use other base images and install the installer manually.

More info here


Have fun !

Apple Mac, Raspberry Pi and the ApplePi-Baker – a match made in heaven !

I recently stumbled on a utility called “ApplePi-Baker” which is the IDEAL little tool to write your Raspberry Pi IMG files to an SD card.

This cool utility allows you to format your SD card, write images to the SD card AND lets you make a back-up of your working Pi SD card.

Very cool tool ! 🙂

I can certainly recommend this to any Raspberry Pi enthusiast using a Mac 🙂

Download here

Like always – Have fun !



Affinity Photo better than Adobe Photoshop ?

We’ve been using Adobe Photoshop and Lightroom for years and although we’re not professional photographers, we’ve enjoyed using the software.

Truth be told – I mainly used Lightroom to import and manage my photo catalogue & doing the odd “enhancement” (colour adjustments, etc.)

Looking at the pricing for the subscription model, it’s not that expensive per month but it does add up over the years.

The nice thing is that you do get continuous upgrades to the software (not all of them great – when you think of the Lightroom “mess” Adobe created a while ago).

Recently however, Heidi had a look at Affinity Photo and she’s well impressed !

For a once-off fee of $49.99, you get the software and support for 2 years !

Compare that with $9.99/month for Lightroom & Photoshop.

So we’ve decided to cancel our Adobe Creative Cloud Photographer bundle (Lightroom and Photoshop) and will now be using Affinity Photo instead.

There are a couple of things missing – it doesn’t handle the import and management of your photos as well as Lightroom, but it’s something I can probably work around.

Affinity Photo won the Apple Mac App of the year 2015 – which says something 🙂

We’ll update you on our experiences as we go along, but for now it’s “Bye-Bye Adobe!”

More info and review of Affinity Photo on TechRadar



Digital EPO and Strava

I was quite stunned today when I read an article published on the Bicycling SA site –

6 Signs You Need a Strava Intervention

According to the article, people do all kinds of “interesting” stuff to get “better” ratings on Strava (or other places which allow you to upload your workout TCX files manually).

The site allows you to “fudge” your data and increase your performance by %. []

I like my cycling and have been a Strava user for many years now, but it never crossed my mind that you could “fudge” your data to get better results.

I use it more to see what friends are doing & to keep track of my progress during the year. I’m not THAT competitive and the Strava bits are just fun.

Anyways, upon further investigation I found this article as well – to help you spot “fudged” data

How to tell if someone used Digital Epo to cheat on Strava

Have fun !


Another Picture Style for Video – Marvels Cine 3.4

While on the subject of using different Picture profiles for filming/video recording, I found another Picture style called “Marvels Cine” for my Canon EOS 7D.

The results looks quite impressive – see here:

finally, the new marvels cine picture style 3.x for canon dslrfinally, the new marvels cine picture style 3.x for canon dslr

The blog entry explains the loading of this onto your camera as well.

Have fun !



More info on the Technicolor Cinestyle Profile

Vincent Laforet wrote an interesting article on the history and use of the Technicolor Cinestyle in 2011 already, but as I said previously I’m only now getting into the filming scene 🙂

Good to share though !

New Technicolor Profile for Canon HDDSLRs


Have fun !


How to install EOS Utility if you can’t find your CD anymore …

So I needed to install the Canon EOS Utility program on my MacBook recently in order to load a new colour profile (Technicolor Cinestyle) onto my Canon 7D, but I could not find the media (CD) which came with my Canon EOS.

As always, the power of the internet is amazing and I found some useful links to people who had experienced the same issue.

I’m not going to re-hash the process as it’s well documented here:


I found that it worked best if you download the EOS Utility 2.14.0 under the OSX 10.7 (Lion) section, edit the install as per the instructions in link above and then install.


EOS Utility 2.14

Once installed, download the updated for OSX 10.11 (El Capitan) and it will update your installation.

Have fun !



Create a free website or blog at

Up ↑