BizTalk: Start EDI batches through SQL Script

Here is the script to start all EDI batches for a given Sender and Receiver Party. the script inserts PAM control messages in database which will trigger EDI batching Orchestration in BizTalk

DECLARE @i int = 47 --start batch Id
WHILE @i <= 80 --end batch id
BEGIN
exec edi_PAMBatchingLogDelete @BatchId=@i,@IgnorePendingControlMessages=0
SET @i = @i + 1
END


INSERT INTO [BizTalkMgmtDb].[dbo].[PAM_Control]
([EdiMessageType]
,[ActionType]
,[ActionDateTime]
,[UsedOnce]
,[BatchId]
,[BatchName]
,[SenderPartyName]
,[ReceiverPartyName]
,[AgreementName])
SELECT 0,
'EdiBatchActivate',
GetDate() as 'ActionDateTime',
0 as 'UsedOnce',
bd.Id,
bd.[Name],
[SenderPartyName],
[ReceiverPartyName],
a.Name
FROM [BizTalkMgmtDb].[tpm].[BatchDescription] bd
join [BizTalkMgmtDb].[tpm].Agreement a on bd.OnewayAgreementId = a.ReceiverOnewayAgreementId

Posted in Misc. Tags: , . Leave a Comment »

Utility vs Strategic Projects

 

A Utility project is where underlying business process is not the differentiator, e.g. Payroll process, every company want it but a better payroll process does not give your business edge over your competition.

The way you staff, run, and budget a strategic project is entirely different to how you do a utility project. For utility projects the biggest risk is some kind of catastrophic error – you don’t want to miss payroll. So you need enough attention to make sure that doesn’t happen, but other than that you want costs to be as low as possible.

However with strategic projects, the biggest risk is not doing something before your competitors do. So you need to be able to react quickly. Cost is much less of an issue because the opportunity cost of not doing something is far greater than costs of software development itself. Usually only 5-10 percent of projects are of strategic type.

Since the definition of utility is that there’s no differentiator, the obvious thing is to go with the package. For a strategic function you don’t want the same software as your competitors because that would cripple your ability to differentiate. Often people realize this and buy a package for a utility project, but then spend huge amounts of money customizing this – which is just as wasteful. My view is that for a utility function you buy the package and adjust your business process to match the software. Usually this is politically infeasible, so the workaround is to put a low grade software team to work on it, provide enough care to avoid catastrophe.

[via Martin Fowler]

What you really need

 

Researchers have found that owning a fast car, a large home and having a good job may only make you happy if those around you are less well off.

It’s too easy to compare ourselves with those around us. (And television gives us a chance to make false comparisons: We see what “normal” people have in commercials and in various programs, and we subconsciously begin to want these things too.)

But even if you know that you oughtn’t compare your life with others, it can be tough to exercise self-control. It’s easy to get swept up by materialism, especially if all of your friends are into it. (If they all have iPhones, you want an iPhone. If they all wear expensive clothes, you want expensive clothes.)

You have to make a conscious effort to not care about what they own and do. Instead, focus on your goals and your needs. What you want or need to own shouldn’t be defined by what other people have; it should be based on what you want to do in life, and what brings you intrinsic happiness.

Believe it or not, much of what we “want” is simply society’s desires in disguise. And because many of our desires lack authenticity we often don’t have the motivation necessary to take the steps needed to reach our destination

How do we know if our wants are real or an illusion? You must determine that, by having a conversation with yourself.

Why Do I Want This?

Are you helping someone just so you can get something back? Or are you helping just for the sake of helping? It’s perfectly OK to have personal goals but don’t lie about your motives in the process.

Am I Willing To Put The Work In?

Are you willing to put in the time and effort to make this goal a reality? Will you be willing to sacrifice along the way? Do you want badly enough to give up your weekends?

[via this and this]

Posted in Misc. 2 Comments »

What makes me happy

Recently, someone came up to me on a plane to KL and looked rather shocked. He asked, ‘How come a millionaire like you is travelling economy?’ My reply was, ‘That’s why I am a millionaire.’ He still looked pretty confused. … Many people have been brainwashed to think that millionaires have to wear Gucci, Hugo Boss, Rolex etc and sit on first class in air travel. This is why so many people never become rich because the moment that earn more money, they think that it is only natural that they spend more, putting them back to square one.

The truth is that most self-made millionaires are frugal and only spend on what is necessary and of value. That is why they are able to accumulate and multiply their wealth so much faster. I refuse to buy a first class ticket or to buy a $300 shirt because I think that it is a complete waste of money. However, I happily pay $1,300 to send my 2-year old daughter to Julia Gabriel Speech and Drama without thinking twice.

Somehow, when you did not have to build everything from scratch, you do not really value money. This is precisely the reason why a family’s wealth (no matter how much) rarely lasts past the third generation. Thank god my rich dad foresaw this terrible possibility and refused to give me a cent to start my business.

Then some people ask me, ‘What is the point in making so much money if you don’t enjoy it?’ The thing is that I don’t really find happiness in buying branded clothes, jewelry or sitting first class. Even if buying something makes me happy it is only for a while…it does not last. material happiness never lasts, it just give you a quick fix. After a while you feel lousy again and have to buy the next thing which you think will make you happy. I always think that if you need material things to make you happy, then you live a pretty sad and unfulfilled life.

Instead, what make ME happy is when I see my children laughing and playing and learning so fast. What makes me happy is when I see by companies and trainers reaching more and more people every year in so many more countries. This happiness makes me feel really good for a long time, much much more than what a Rolex would do for me.

[via Adam Khoo]

Posted in Misc. 2 Comments »

Things to Adopt in Life

 Health:
 
 1. Drink plenty of water.
 2. Eat breakfast like a king, lunch like a prince and dinner like a beggar.
 3. Eat more foods that grow on trees and plants and eat less food that is manufactured in plants.
 4. Live with the 3 E’s — Energy, Enthusiasm, and Empathy.
 5. Make time to practice prayer, meditation and yoga.
 6. Play more games.
 7. Read more books
 8. Sit in silence for at least 10 minutes each day.
 9. Sleep for 7 hours.
 10. Take a 10-30 minutes walk every day. And while you walk, smile.

 Personality

 11. Don’t compare your life to others’. You have no idea what their journey is all about.
 12. Don’t have negative thoughts or things you cannot control. Instead invest your energy in the positive present
moment.
 13. Don’t over do. Keep your limits.
 14. Don’t take yourself so seriously. No one else does.
 15. Don’t waste your precious energy on gossip.
 16. Envy is a waste of time. You already have all you need.
 17. Forget issues of the past. Don’t remind your partner with his/her mistakes of the past. That will ruin your
present happiness.
 18. Life is too short to waste time hating anyone. Don’t hate others.
 19. Smile and laugh more.
 20. You don’t have to win every argument.
Agree to disagree.

 Society

 21. Call your family often.
 22. Each day give something good to others.
 23. Forgive everyone for everything.
 24. Spend time with people over the age of 70 & under the age of 6.
 25. Try to make at least three people smile each day.
 26. What other people think of you is none of your business.
 27. Your job won’t take care of you when you are sick. Your friends will. Stay in touch.
 

Life

 28. Do the right thing!
 29. However good or bad a situation is, it will change.
 30. No matter how you feel, get up, dress up and show up.
 31. The best is yet to come.

Excerpt: Dan Pink on the surprising science of motivation

There is a mismatch between what science knows and what business does. And here is what science knows. One: Those 20th century rewards, those motivators we think are the natural part of business, do work, but only in a surprisingly narrow band of circumstances. Two: Those if-then rewards often destroy creativity. Three: The secret to high performance isn’t rewards and punishments, but that unseen intrinsic drive. The drive to do things for their own sake.The drive to do things cause they matter.

Let me give you an even more radical example of it. Something called the Results Only Work Environment. The ROWE.  Created by two American consultants, in place at about a dozen companies around North America. In a ROWE people don’t have schedules. They show up when they want. They don’t have to be in the office at a certain time, or any time. They just have to get their work done. How they do it, when they do it, where they do it, is totally up to them. Meetings in these kinds of environments are optional.

What happens? Almost across the board, productivity goes up, worker engagement goes up, worker satisfaction goes up, turnover goes down. Autonomy, mastery and purpose, These are the building blocks of a new way of doing things

[via TedTalk]

A Life That Matters

Ready or not, some day your life will come to an end.

There will be no more sunrises, no minutes, hours or days.

All the things you collected, whether treasured or forgotten, will pass to someone else.

Your wealth, fame and temporal power will shrivel to irrelevance.

Your grudges, resentments, frustrations, and jealousies will finally disappear.

So, too, your hopes, ambitions, plans, and to-do lists will expire.

The wins and losses that once seemed so important will fade away.

It won’t matter where you came from, or on what side of the tracks you lived at the end.

So what will matter?

How will the value of your days be measured?

What will matter is not what you bought, but what you built.

What will matter is not what you got, but what you gave.

What will matter is not your success, but your significance.

What will matter is every act of integrity, compassion, courage or sacrifice that enriched, empowered or encouraged others to emulate your example.

What will matter is not your competence, but your character.

What will matter is not how many people you knew, but how many will feel a lasting loss when you’re gone.

What will matter is not your memories, but the memories that live in those who loved you.

What will matter is how long you will be remembered, by whom and for what.

Living a life that matters doesn’t happen by accident.

It’s not a matter of circumstance but of choice.

Choose to live a life that matters.

[via]